Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Connect to pc using DSL ? Pin
Dave Kreskowiak5-May-07 18:07
mveDave Kreskowiak5-May-07 18:07 
QuestionUploading a file from C# Windows Application to ASP.NEtTWeb form Pin
Raza Hussain4-May-07 20:19
Raza Hussain4-May-07 20:19 
QuestionAbout Webbrowser's MesssageBox Pin
amon04244-May-07 20:05
amon04244-May-07 20:05 
Questioninserting unicode character from c# program to sql server 2005 Pin
rehab14-May-07 19:54
rehab14-May-07 19:54 
AnswerRe: inserting unicode character from c# program to sql server 2005 Pin
lost in transition 4-May-07 20:22
lost in transition 4-May-07 20:22 
Questioninserting unicode character from c# to sql server 2005 Pin
rehab14-May-07 19:52
rehab14-May-07 19:52 
AnswerRe: inserting unicode character from c# to sql server 2005 Pin
Hesham Amin4-May-07 22:23
Hesham Amin4-May-07 22:23 
QuestionObject reference not set to an instance of an object. Pin
balanjingot4-May-07 19:19
balanjingot4-May-07 19:19 
hi,

what would be the probable cause why i received this kind of error message...

this is my code:

try
{

foreach(DataGridViewRow row in dataGridView4.Rows)
{
long itemcode = 0;
string description = "";
int quantity = 0;
string unit = "";

itemcode = Convert.ToInt64(row.Cells[0].Value);
description = row.Cells[1].Value.ToString();

quantity = Convert.ToInt32(row.Cells[2].Value);
unit = row.Cells[3].Value.ToString();

String query = "INSERT INTO test(itemcode,description,quantity,unit) VALUES (itemcode,description,quantity,unit)";

MySqlCommand command = new MySqlCommand(query, connection);
command.ExecuteNonQuery();
}
}

catch (MySqlException mse)
{
MessageBox.Show(mse.Message);
}
}

jing

AnswerRe: Object reference not set to an instance of an object. Pin
lost in transition 4-May-07 19:50
lost in transition 4-May-07 19:50 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot4-May-07 20:00
balanjingot4-May-07 20:00 
GeneralRe: Object reference not set to an instance of an object. Pin
lost in transition 4-May-07 20:20
lost in transition 4-May-07 20:20 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot4-May-07 20:58
balanjingot4-May-07 20:58 
AnswerRe: Object reference not set to an instance of an object. Pin
PIEBALDconsult4-May-07 19:53
mvePIEBALDconsult4-May-07 19:53 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot4-May-07 20:04
balanjingot4-May-07 20:04 
GeneralRe: Object reference not set to an instance of an object. Pin
lmoelleb4-May-07 21:16
lmoelleb4-May-07 21:16 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot4-May-07 21:49
balanjingot4-May-07 21:49 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot4-May-07 21:46
balanjingot4-May-07 21:46 
GeneralRe: Object reference not set to an instance of an object. Pin
PIEBALDconsult5-May-07 4:14
mvePIEBALDconsult5-May-07 4:14 
GeneralRe: Object reference not set to an instance of an object. Pin
PIEBALDconsult5-May-07 4:45
mvePIEBALDconsult5-May-07 4:45 
GeneralRe: Object reference not set to an instance of an object. Pin
PIEBALDconsult5-May-07 5:01
mvePIEBALDconsult5-May-07 5:01 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot6-May-07 14:23
balanjingot6-May-07 14:23 
AnswerRe: Object reference not set to an instance of an object. Pin
Rob Graham5-May-07 12:08
Rob Graham5-May-07 12:08 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot6-May-07 14:28
balanjingot6-May-07 14:28 
AnswerRe: Object reference not set to an instance of an object. Pin
AFSEKI7-May-07 3:07
AFSEKI7-May-07 3:07 
GeneralRe: Object reference not set to an instance of an object. Pin
balanjingot7-May-07 14:32
balanjingot7-May-07 14:32 

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.