By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,039 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,039 IT Pros & Developers. It's quick & easy.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10' - AGAIN

P: 2
Hi

There seem to be a number of posts already with this error message but none of them have helped me ...

I am trying to execute some dynamic SQL from an ASP form to update or delete from a table and I get the following output:-

==
SQL=Update StockItemMaterials set [MatQuantity]=3 WHERE [StockItemCompKey]="P0855" AND [MaterialCode]="GOGGW"

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.

/Apps/sv_simUpd.asp, line 44
==

The table I am trying to update is:
Select * from StockItemMaterials WHERE StockItemCompKey='P0855'

StockItemCompKey Text
MaterialCode Text
MatQuantity Number
UnitPrice Number
OverRideFactor Number
Ganoksin Yes/No
TotalPrice Number

Example Data: P0855 GOGGW 5310 0 True 0

I also get the same error when trying to delete from this table:
==
SQL=Delete from StockItemMaterials WHERE [StockItemCompKey]="P0855" AND [MaterialCode]="GOGGW"
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.

/Apps/sv_simUpd.asp, line 44
==

I have cut and pasted the SQL into an ACCESS query and it runs fine!

Thanks
Dec 28 '06 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,494
The table I am trying to update is:
Select * from StockItemMaterials WHERE StockItemCompKey='P0855'
I'm guessing a little here :
The select query above works.
The table you're actually referring to is StockItemMaterials rather than the SQL query posted.
If so, then I would think the problem you have is that the quotes you are using (") are not generally valid SQL. They will work in Access because M$ decided to be more flexible with their SQL rules.
You need to use (') for strings in SQL as in the SQL above, then it may work.
Dec 30 '06 #2

P: 2
I'm guessing a little here :
The select query above works.
The table you're actually referring to is StockItemMaterials rather than the SQL query posted.
If so, then I would think the problem you have is that the quotes you are using (") are not generally valid SQL. They will work in Access because M$ decided to be more flexible with their SQL rules.
You need to use (') for strings in SQL as in the SQL above, then it may work.
Yep - that's the answer - many thanks!
Dec 31 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.