Answered by:
ERROR [HY000] parameter marker count incorrect (1)

Question
-
Hi All,
I am using ODBC connection to connect my SQlite database. its is working fine for insert and delete data but if i am updating any data then i am getting below error.
"ERROR [HY000] parameter marker count incorrect (1)"
here is my query which i am using :
SQLConnection.Instance.Open();
OdbcCommand mySQLiteCommand = SQLConnection.Instance._dbCon.CreateCommand();
mySQLiteCommand.CommandText = "Update SyncTable set LastTime = @LastTime,Status = @Status Where DisplayName = '" + task.Key + "'and UserName = '" + loginObj.Key + "'";
mySQLiteCommand.Parameters.Clear();
mySQLiteCommand.Parameters.Add(new OdbcParameter("@LastTime", task.Value as object));
mySQLiteCommand.Parameters.Add(new OdbcParameter("@Status", status as object));
mySQLiteCommand.ExecuteNonQuery();
SQLConnection.Instance.Close();i am not getting where i am doing wrong.Please help me.
Thanks
sumitk
- Moved by Fred Bao Tuesday, October 22, 2013 2:48 AM It is a off-topic thread
Monday, October 21, 2013 8:22 AM
Answers
-
Hello Sumitk,
Since the issue you are facing is related to SQlite, I would suggest you to post this question in the SQlite forums:
http://www.hwaci.com/sw/sqlite/prosupport.html
If you have any other issues with Data PlatForm in the future, please get back to us and we would be happy to help you.
And for the error message “ERROR [HY000] parameter marker count incorrect (1)”, you can have a look at link below:
http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html
Thanks for your understanding.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Tuesday, October 22, 2013 2:47 AM
All replies
-
Hello Sumitk,
Since the issue you are facing is related to SQlite, I would suggest you to post this question in the SQlite forums:
http://www.hwaci.com/sw/sqlite/prosupport.html
If you have any other issues with Data PlatForm in the future, please get back to us and we would be happy to help you.
And for the error message “ERROR [HY000] parameter marker count incorrect (1)”, you can have a look at link below:
http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html
Thanks for your understanding.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Tuesday, October 22, 2013 2:47 AM -
Hi all,
I found solution myself.
instead of @LastTime,@status i used just "?" in mySQLiteCommand.CommandText and now i am not getting any error.
sumitk
Thursday, October 31, 2013 3:10 AM