Sumit Kumawat

Sumit Kumawat

  • NA
  • 454
  • 411.6k

SQL logic error or missing database Insufficient parameters

Jun 12 2013 8:57 AM
You cannot vote on your own post
0

Hi all,

Through my app i am storing users information in Sqlite database.In database table i have one field which datatype is "Date". while updating Fields in table i am getting following error

"SQL logic error or missing database Insufficient parameters supplied to the command"

below in code which i am using.

mySQLiteCommand.CommandText = "Update  Users set LastDate = @LastDate ,Status = @Status Where Name = '" + item.Key + "'and LastName = '" + item1.Key + "'";

 

 mySQLiteCommand.Parameters.Add(new SQLiteParameter("@LastDate ",object)item.Value));
 mySQLiteCommand.Parameters.Add(new SQLiteParameter("@Status", (object)status));
  mySQLiteCommand.ExecuteNonQuery();

 SQLConnection.Instance.Close();

Please help me

Thanks



Answers (3)