I have example like follows:
OleDbCommand InsertCommand =
new OleDbCommand("I NSERT INTO RecnikTable VALUES (@ENGLESKI, @SRPSKI)",
thisConnection) ;
InsertCommand.P arameters.Add(" @ENGLESKI", OleDbType.VarCh ar);
InsertCommand.P arameters.Add(" @SRPSKI", OleDbType.VarCh ar);
string[] reci = {textBox2.Text, textBox2.Text};
InsertCommand.P arameters["@ENGLESKI"].Value=reci[0];
InsertCommand.P arameters["@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("I NSERT INTO RecnikTable VALUES (@ENGLESKI, @SRPSKI)",
thisConnection) ;
InsertCommand.P arameters.Add(" @ENGLESKI", OleDbType.VarCh ar);
InsertCommand.P arameters.Add(" @SRPSKI", OleDbType.VarCh ar);
string[] reci = {textBox2.Text, textBox2.Text};
InsertCommand.P arameters["@ENGLESKI"].Value=reci[0];
InsertCommand.P arameters["@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
Comment