Click here to Skip to main content
15,911,646 members
Home / Discussions / Database
   

Database

 
QuestionThrowing an Exception Pin
M. J. Jaya Chitra23-Jun-07 0:08
M. J. Jaya Chitra23-Jun-07 0:08 
AnswerRe: Throwing an Exception Pin
kubben23-Jun-07 2:02
kubben23-Jun-07 2:02 
GeneralRe: Throwing an Exception Pin
M. J. Jaya Chitra23-Jun-07 2:05
M. J. Jaya Chitra23-Jun-07 2:05 
QuestionAsgin new schema to a procedure and a table Pin
merwa22-Jun-07 22:59
merwa22-Jun-07 22:59 
QuestionUnicode Characcters in Query. Pin
Polite Programmer22-Jun-07 20:54
Polite Programmer22-Jun-07 20:54 
AnswerRe: Unicode Characcters in Query. Pin
Rob Graham24-Jun-07 3:13
Rob Graham24-Jun-07 3:13 
QuestionC#/ADO.NET Import Problems Pin
Bryan Bradford22-Jun-07 11:00
Bryan Bradford22-Jun-07 11:00 
AnswerRe: C#/ADO.NET Import Problems Pin
Rob Graham24-Jun-07 3:31
Rob Graham24-Jun-07 3:31 
I'm not sure what you are trying to do here, but it doesn't look correct.
you have created a command query containing a select statement that specifies a list of fields to be selected from the worksheet named Excel$. You read the results of that query into a command object that is linked to a stored proc in SQL server somewhere. You open a connection, set command parameters to row values read from excel and then close the connection (do you execute the command first?).
First, I would open and close the connection outside of the reader while loop, and just execute SQLcmd3 at the bottom of the loop. Close and dispose of the connection (and command) after the while loop.
Set a breakpoint at one of the lines that sets a parameter value and verify that you are really returning data from the sheet.

Good luck



QuestionThis query is making me crazy... [modified] Pin
_Zorro_22-Jun-07 9:45
professional_Zorro_22-Jun-07 9:45 
AnswerRe: This query is making me crazy... Pin
Krish - KP22-Jun-07 14:24
Krish - KP22-Jun-07 14:24 
GeneralRe: This query is making me crazy... Pin
_Zorro_23-Jun-07 16:21
professional_Zorro_23-Jun-07 16:21 
QuestionUsing OleDbReader.GetString to Retrieve Strings over 200 characters Pin
Nigel Cudjoe22-Jun-07 7:50
Nigel Cudjoe22-Jun-07 7:50 
QuestionSQL Server 2008 Pin
Brendan Vogt22-Jun-07 6:17
Brendan Vogt22-Jun-07 6:17 
AnswerRe: SQL Server 2008 Pin
Mike Dimmick23-Jun-07 1:37
Mike Dimmick23-Jun-07 1:37 
AnswerRe: SQL Server 2008 Pin
zhousz23-Jun-07 23:36
zhousz23-Jun-07 23:36 
GeneralRe: SQL Server 2008 Pin
Colin Angus Mackay24-Jun-07 2:24
Colin Angus Mackay24-Jun-07 2:24 
QuestionDatabase Architecture:Record Locking Pin
xbiplav22-Jun-07 4:59
xbiplav22-Jun-07 4:59 
AnswerRe: Database Architecture:Record Locking Pin
Pete O'Hanlon22-Jun-07 9:56
mvePete O'Hanlon22-Jun-07 9:56 
AnswerRe: Database Architecture:Record Locking Pin
Mike Dimmick23-Jun-07 2:03
Mike Dimmick23-Jun-07 2:03 
QuestionPlz solve this query Pin
Care Career22-Jun-07 3:31
Care Career22-Jun-07 3:31 
AnswerRe: Plz solve this query Pin
Blue_Boy22-Jun-07 3:41
Blue_Boy22-Jun-07 3:41 
GeneralRe: Plz solve this query Pin
AlexeiXX322-Jun-07 9:05
AlexeiXX322-Jun-07 9:05 
AnswerRe: Plz solve this query Pin
Krish - KP22-Jun-07 14:26
Krish - KP22-Jun-07 14:26 
GeneralRe: Plz solve this query Pin
Colin Angus Mackay24-Jun-07 2:27
Colin Angus Mackay24-Jun-07 2:27 
Questionuser sql server Pin
WhiteGirl2322-Jun-07 1:10
WhiteGirl2322-Jun-07 1:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.