Click here to Skip to main content
14,739,502 members
Home » Discussions » C#
   

C#

 
GeneralRe: Is my program idea possible? Pin
OriginalGriff28-Nov-20 9:22
mveOriginalGriff28-Nov-20 9:22 
GeneralRe: Is my program idea possible? Pin
Liktor Janos11-Dec-20 8:42
MemberLiktor Janos11-Dec-20 8:42 
GeneralRe: Is my program idea possible? Pin
Gerry Schmitz28-Nov-20 8:51
mveGerry Schmitz28-Nov-20 8:51 
QuestionError in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 4:47
MemberAlex Dunlop23-Nov-20 4:47 
AnswerRe: Error in SQL Light Compact 4 Pin
Victor Nijegorodov23-Nov-20 4:56
MemberVictor Nijegorodov23-Nov-20 4:56 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 5:04
MemberAlex Dunlop23-Nov-20 5:04 
GeneralRe: Error in SQL Light Compact 4 Pin
Richard Deeming23-Nov-20 5:18
mveRichard Deeming23-Nov-20 5:18 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 5:29
mveOriginalGriff23-Nov-20 5:29 
That's not an SQL error - that's a C# error:
myCommand.Parameters.AddWithValue("@ReceiveDate", dataGridView1.Rows[i].Cells[10].Value.ToString());

If the cell value is null, you can't call ToString (or any other property / method) on it.

You could try
myCommand.Parameters.AddWithValue("@ReceiveDate", dataGridView1.Rows[i].Cells[10].Value?.ToString());
Depending on your C# version.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 8:38
MemberAlex Dunlop23-Nov-20 8:38 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 8:53
mveOriginalGriff23-Nov-20 8:53 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:10
MemberAlex Dunlop23-Nov-20 9:10 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 9:19
mveOriginalGriff23-Nov-20 9:19 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:28
MemberAlex Dunlop23-Nov-20 9:28 
GeneralRe: Error in SQL Light Compact 4 Pin
Richard Deeming23-Nov-20 18:43
mveRichard Deeming23-Nov-20 18:43 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop24-Nov-20 7:06
MemberAlex Dunlop24-Nov-20 7:06 
GeneralRe: Error in SQL Light Compact 4 Pin
Dave Kreskowiak24-Nov-20 9:52
mveDave Kreskowiak24-Nov-20 9:52 
AnswerRe: Error in SQL Light Compact 4 Pin
Dave Kreskowiak23-Nov-20 6:58
mveDave Kreskowiak23-Nov-20 6:58 
Questioninteresting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 19:59
mveBillWoodruff22-Nov-20 19:59 
AnswerRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 21:06
mvaSandeep Mewara22-Nov-20 21:06 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:19
mveBillWoodruff22-Nov-20 23:19 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 23:38
mvaSandeep Mewara22-Nov-20 23:38 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:46
mveBillWoodruff22-Nov-20 23:46 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 23:51
mvaSandeep Mewara22-Nov-20 23:51 
AnswerRe: interesting issue with SortedSet and ElementAt Pin
Richard Deeming22-Nov-20 23:15
mveRichard Deeming22-Nov-20 23:15 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:40
mveBillWoodruff22-Nov-20 23:40 

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.