Dear Readers, I am having problems regarding the execution of SQL Queries. My Table in MS Access is as follows: stodkID - Number - Integer (Field Size) Stock Symbol - Text - 50 Shares - Number - Long Integer Price - Number - Long Integer Buy Date - Date/Time - Input Mask (99/99/0000;0;_)
I have defined queries for Adding, Updating, Finding and Deleting Records. My Finding query works perfectly but somehow I am facing problems with the others.
My Add query is as follows: "INSERT INTO Stocks (stockID, 'Stock Symbol', Shares, Price, 'Buy Date') " + "VALUES (?,?,?,?,?)"; Error while executing: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
Error while executing: UPDATE Stocks SET stockID = 1, 'Stock Symbol' = 'ASAP', Shares = 14, Price = 50, 'Buy Date' = '2005-09-12 00:00:00' WHERE stockID = 1 [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3.
My Delete Record is as follows: "DELETE FROM Stocks " + " WHERE stockID = " + id;
Error while executing: It informs me that rows were deleted, but when I open the database to check, the record is still there.
Is it possible that there is a conflict in the versions of the database? The file format is MS Access 2000 but I am currently using MS Access 2003. [ May 30, 2007: Message edited by: Shyam Prasad Murarka ]
Dear Readers, Ok, first of all sorry. I had put in the wrong column names. I changed it. And now my update statement does not produce any error... BUT it still does not update the record in the database! Same thing is still happening with Delete statement. And my error for Add statement is still the same. What is autocommit? I don't know anything about it? And as far as I know I am not doing any rollback. Its a very simple application. Thank you for your reply.
author & internet detective