M
mp
I have example like follows:
OleDbCommand InsertCommand =
new OleDbCommand("INSERT INTO RecnikTable VALUES (@ENGLESKI, @SRPSKI)",
thisConnection);
InsertCommand.Parameters.Add("@ENGLESKI", OleDbType.VarChar);
InsertCommand.Parameters.Add("@SRPSKI", OleDbType.VarChar);
string[] reci = {textBox2.Text, textBox2.Text};
InsertCommand.Parameters["@ENGLESKI"].Value=reci[0];
InsertCommand.Parameters["@SRPSKI"].Value=reci[1];
This does not work.
If I use hard coded values instead reci[0] it does not work too. Interesting
is, if I use this example like command line project everything works
perfectly.
Does somebody know what is wrong?
Thanks
OleDbCommand InsertCommand =
new OleDbCommand("INSERT INTO RecnikTable VALUES (@ENGLESKI, @SRPSKI)",
thisConnection);
InsertCommand.Parameters.Add("@ENGLESKI", OleDbType.VarChar);
InsertCommand.Parameters.Add("@SRPSKI", OleDbType.VarChar);
string[] reci = {textBox2.Text, textBox2.Text};
InsertCommand.Parameters["@ENGLESKI"].Value=reci[0];
InsertCommand.Parameters["@SRPSKI"].Value=reci[1];
This does not work.
If I use hard coded values instead reci[0] it does not work too. Interesting
is, if I use this example like command line project everything works
perfectly.
Does somebody know what is wrong?
Thanks