Is there anything Wrong in SQL Syntax ?
Sql syntax :
UPDATE Table1 SET
Username='Diana' ,
Email='[email protected]' ,
FirstName='' ,
LastName='' ,
CrediCardNum=''
Where Username='Diana'
it Keeps Giving me the Error:
No value given for one or more required parameters.
I tried restarting visual studio but keeps giving the same error
c# code
f1.Connection1.Open();
OleDbCommand Command = new OleDbCommand();
Command.Connection = f1.Connection1;
if(m[6].Contains("Red"))
Command.CommandText = "UPDATE userdlt SET Username='"+textBox10.Text+"' , Email='"+textBox9.Text+"' , FirstName='"+textBox8.Text+ "',LastName='"+textBox7.Text+"',CrediCardNum='"+textBox6.Text+"' Where Username='"+m[0]+"'" ;
else
Command.CommandText = "UPDATE Table1 SET Username='"+textBox10.Text+"' , Email='"+textBox9.Text+"' , FirstName='"+textBox8.Text+ "' , LastName='"+textBox7.Text+"' , CrediCardNum='"+textBox6.Text+"' Where Username='"+m[0]+"'" ;
Clipboard.SetText(Command.CommandText);
Command.ExecuteNonQuery();
f1.Connection1.Close();
MessageBox.Show("Member UPDATED Succefully");
The m array is Array of Strings
Your column name
creditcardNum
missingt
it should be
Your table definition picture saying
CreditCardNum