posted 17 years ago
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
My Update query is as follows:
"UPDATE Stocks " +
"SET stockID = "+ st.getID() + ", " +
"'Stock Symbol' = '" + st.getSymbol()+ "', " +
"Shares = " + st.getShares() + ", " +
"Price = " + st.getPrice() + ", " +
"'Buy Date' = '" + st.getBuyDate() + "' " +
"WHERE stockID = " + id;
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 ]
With Best Regards,
Shyam Prasad Murarka