Click here to Skip to main content
15,885,244 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to run in local computer website Pin
OriginalGriff6-Jul-13 4:42
mveOriginalGriff6-Jul-13 4:42 
QuestionTo copy listbox values into gridview column Pin
vijaydhiva6-Jul-13 0:14
vijaydhiva6-Jul-13 0:14 
AnswerRe: To copy listbox values into gridview column Pin
Abhinav S6-Jul-13 1:40
Abhinav S6-Jul-13 1:40 
AnswerRe: To copy listbox values into gridview column Pin
Eddy Vluggen6-Jul-13 9:47
professionalEddy Vluggen6-Jul-13 9:47 
Questionc# error Pin
User34905-Jul-13 8:23
User34905-Jul-13 8:23 
AnswerRe: c# error Pin
jschell5-Jul-13 8:46
jschell5-Jul-13 8:46 
AnswerRe: c# error Pin
User34905-Jul-13 9:07
User34905-Jul-13 9:07 
AnswerRe: c# error Pin
Emmanuel Medina5-Jul-13 10:01
professionalEmmanuel Medina5-Jul-13 10:01 
Have you verified that your query string returns the appropiate data?

Does
zebra88 wrote:
dialog.FileName
and
zebra88 wrote:
txtdateref.Text
have appropiate values?

Sounds to me that ExecuteScalar is returning null.

According to the MSDN documentation[^] on the OleDbCommand:

Return Value
Type: System.Object
The first column of the first row in the result set, or a null reference if the result set is empty.

Check if it is indeed returning null, if it is, check your input.
If you think you can do a thing or think you can't do a thing, you're right - Henry Ford

Emmanuel Medina Lopez

GeneralRe: c# error Pin
User34905-Jul-13 10:36
User34905-Jul-13 10:36 
GeneralRe: c# error Pin
Emmanuel Medina8-Jul-13 2:42
professionalEmmanuel Medina8-Jul-13 2:42 
GeneralRe: c# error Pin
User34908-Jul-13 3:34
User34908-Jul-13 3:34 
GeneralRe: c# error Pin
User34906-Jul-13 7:16
User34906-Jul-13 7:16 
AnswerRe: c# error Pin
Mycroft Holmes5-Jul-13 14:09
professionalMycroft Holmes5-Jul-13 14:09 
AnswerRe: c# error Pin
Richard MacCutchan5-Jul-13 22:28
mveRichard MacCutchan5-Jul-13 22:28 
GeneralRe: c# error Pin
User34906-Jul-13 10:25
User34906-Jul-13 10:25 
GeneralRe: c# error Pin
NotPolitcallyCorrect6-Jul-13 10:35
NotPolitcallyCorrect6-Jul-13 10:35 
GeneralRe: c# error Pin
Eddy Vluggen6-Jul-13 11:35
professionalEddy Vluggen6-Jul-13 11:35 
GeneralRe: c# error Pin
User34906-Jul-13 12:15
User34906-Jul-13 12:15 
GeneralRe: c# error Pin
Eddy Vluggen9-Jul-13 8:55
professionalEddy Vluggen9-Jul-13 8:55 
GeneralRe: c# error Pin
Richard MacCutchan6-Jul-13 21:42
mveRichard MacCutchan6-Jul-13 21:42 
GeneralRe: c# error Pin
User34907-Jul-13 4:26
User34907-Jul-13 4:26 
GeneralRe: c# error Pin
Richard MacCutchan7-Jul-13 7:21
mveRichard MacCutchan7-Jul-13 7:21 
GeneralRe: c# error Pin
User34907-Jul-13 8:28
User34907-Jul-13 8:28 
GeneralRe: c# error Pin
Richard MacCutchan7-Jul-13 20:38
mveRichard MacCutchan7-Jul-13 20:38 
QuestionC# SQL SELECT query taking too long Pin
IceUK5-Jul-13 5:48
IceUK5-Jul-13 5:48 

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.