On Apr 18, 1:36 pm, Greg Corradini <[EMAIL PROTECTED]> wrote: > Hello All, > A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among > other things, both scripts create new tables, perform a query and then > populate the tables with data in a dictionary that I've uploaded from > elsewhere. These scripts have run hundreds of times in the last few weeks > with no problems. > > But recently they continue to bail on the mycursor.execute('An SQL > Statement') after the table has been created. I get the following error > message: > Traceback (most recent call last): > File "C:\Documents and Settings\marv1shi\Desktop\Workspace\Existence > Script\DBF Checker\Access_SQL.py", line 35, in ? > curse.execute(sql) > ProgrammingError: ('07001', -3010, '[Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 4.', 4612) > > The real stinker, however, is that after it bails I can manually call > mycursor.execute('An SQL Statement'), then call my insert statement in the > Python Shell and it works fine. > > I just can't figure out how to reconcile this problem. Has anybody run into > this before? > > Thanks > Greg Corradini > -- > View this message in > context:http://www.nabble.com/Help-Understanding-mx.ODBC-Error-tf3602497.html... > Sent from the Python - python-list mailing list archive at Nabble.com.
Normally too few parameters refers to the SQL statement not inserting the proper number of items. An example would be to list 4 values and only insert 3. See below for a pseudo-SQL statement: INSERT into someDB (id, name, address, state) VALUES (value1, value2, value3) That should give the same error, I would think. You may need to check if your SQL statement or the way your db is created has changed in some way. Mike -- http://mail.python.org/mailman/listinfo/python-list