cobom
Posts: 55
|
| Posted: 09/22/2004, 1:11 PM |
|
Is there any way to troubleshoot an ODBC error? This is what I get when I edit a record after clicking on a link in a grid to populate the record with the data I need to edit:
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. (Microsoft OLE DB Provider for ODBC Drivers)
I am using access and ASP. All the other pages allow editing so I do not think it could be the connection string.
I checked all fields so that they are not required and that the format matches the dbase field format. I have deleted and regenerated the code - no luck. I am at my WHITS END. So any help would be greatly appreciated.
Thanks
_________________
cmckinney@searay.com
Will program for a Sea Ray 680 SS ;} |
 |
 |
peterr
Posts: 5971
|
| Posted: 09/22/2004, 1:25 PM |
|
This doesn't look like ODBC error. It's rather MS Access SQL error.
You can debug it using the standard SQL debug methods. For example copy and paste your SQL to MS Access and see thee why it doesn't work. Or use the debugging tips at http://docs.codecharge.com/studio/html/ProgrammingTechn...yingOutput.html
Possibly some other discussions related to this issue may be helpful as well: http://www.google.com/search?hl=en&ie=UTF-8&q=%22Too+fe....+Expected+2%22
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
cobom
Posts: 55
|
| Posted: 09/22/2004, 2:12 PM |
|
Since this is an Update I do not see how to do a response.write anywhere to help me troublshoot, or what sql to run against the database. Its a pretty simple table - ID, Username, date, and a few fields to add amounts to. None of the dbase fields themself are mandatory either.
I understand that I am sending too few parameters to the database - where do I lok to see what parameters the form is trying to send?
_________________
cmckinney@searay.com
Will program for a Sea Ray 680 SS ;} |
 |
 |
peterr
Posts: 5971
|
| Posted: 09/22/2004, 2:33 PM |
|
Here is something that worked for me in CCS Example Pack -> Order Entry -> store_orders_record -> Before Execute Update:response.write store_orders_record.Command.SQL & ":<br>"
response.end
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
cobom
Posts: 55
|
| Posted: 09/22/2004, 6:12 PM |
|
Thanks Peter, The response.write led me right to the culprit field. Funny though - I was sending a field that was removed from the database - the error said I was not sending enough??
Anyway - it is fixed
Thanks
_________________
cmckinney@searay.com
Will program for a Sea Ray 680 SS ;} |
 |
 |
Nicole
Posts: 586
|
| Posted: 09/24/2004, 2:24 AM |
|
This is standard error message for incorrect parameters, never mind if it is useless parameter or some parameters are missing
_________________
Regards,
Nicole |
 |
 |