I’m getting an error while I’m trying to insert a value from a C# form using OLEDB Connection.
strSQL = "INSERT INTO test_table (username,password) " +
"VALUES (@user,@pass)";
objCmd = new OleDbCommand(strSQL, objConnection);
objCmd.Parameters.Add("@user", OleDbType.VarChar, 255).Value =TextBox1.Text.Trim();
objCmd.Parameters.Add("@pass", OleDbType.VarChar, 255).Value= TextBox2.Text.Trim();
// execute the command
objCmd.ExecuteNonQuery();
objConnection.Close();
Label1.Text = "Command run";
Error is
Exception Details: System.Data.OleDb.OleDbException: One or more
errors occurred during processing of command. ORA-00936: missing
expression
I believe you’re missing a space between
VALUESfriend. I added one after the)in the fields list for you in the below example.