473,732 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Understanding mx.ODBC Error


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.execut e('An SQL
Statement') after the table has been created. I get the following error
message:
Traceback (most recent call last):
File "C:\Documen ts and Settings\marv1s hi\Desktop\Work space\Existence
Script\DBF Checker\Access_ SQL.py", line 35, in ?
curse.execute(s ql)
ProgrammingErro r: ('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.execut e('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-Understan...html#a10063746
Sent from the Python - python-list mailing list archive at Nabble.com.

Apr 18 '07 #1
2 1858
On Apr 18, 1:36 pm, Greg Corradini <gregcorrad...@ gmail.comwrote:
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.execut e('An SQL
Statement') after the table has been created. I get the following error
message:
Traceback (most recent call last):
File "C:\Documen ts and Settings\marv1s hi\Desktop\Work space\Existence
Script\DBF Checker\Access_ SQL.py", line 35, in ?
curse.execute(s ql)
ProgrammingErro r: ('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.execut e('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-Understan...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

Apr 18 '07 #2

Thanks for you help kyosohma,
Unfortunately, the data I'm using isn't chaning either. I've reused data
that these scripts have successfully used before, but that won't work with
them now.
kyosohma wrote:
>
On Apr 18, 1:36 pm, Greg Corradini <gregcorrad...@ gmail.comwrote:
>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.execut e('An SQL
Statement') after the table has been created. I get the following error
message:
Traceback (most recent call last):
File "C:\Documen ts and Settings\marv1s hi\Desktop\Work space\Existence
Script\DBF Checker\Access_ SQL.py", line 35, in ?
curse.execute( sql)
ProgrammingErr or: ('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.execu te('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-Understan...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

--
View this message in context: http://www.nabble.com/Help-Understan...html#a10065312
Sent from the Python - python-list mailing list archive at Nabble.com.

Apr 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1470
by: Jon LaRosa | last post by:
Hi all - I have a web application and I want to be able to do some basic error handling. For example, here is one error I would like to catch and display in a useful way for the user: ----------------- Microsoft OLE DB Provider for ODBC Drivers error '80040e14' UPDATE statement conflicted with COLUMN FOREIGN KEY constraint
8
5478
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
2
17759
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line and I'm sure you'll get their attention. | Their usually very good:) So here's my transplanted post ==========================================
0
1812
by: Wayfarer | last post by:
I loaded my Visual Studio, which includes SQL Server version 7.0. I did not encounter any error messages in the installation. It created two DSN entries: LocalServer & MQIS Unfortunately neither are working for me: Microsoft SQL Server ODBC Driver Version 03.70.0623 Data Source Name: LocalServer
4
2716
by: Phil Latio | last post by:
Scenario is: We have an intranet on which a Helpdesk application can be accessed. Data input into the Helpdesk is stored in a Access 2000 database, held on a server. This is great, works fine, Users and IT have a warm fuzzy feeling of contentment. Turns out Helpdesk application is short of decent reporting capabilities. So, I create an Access DB on my machine, via ODBC, link to the tables within the Helpdesk Access database. I set the...
0
1218
by: Marlon | last post by:
I got the error message below when I try to open a connection with code: Dim connection As New OdbcConnection("Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=C:\Inetpub\aesd") connection.Open() I am developing an asp.net application on Windows XP SP2. Can anyone help? Personal I think it is because of the limited permissions that asp.net account has.
13
4648
by: ppateel | last post by:
Hi, I am new to c++ and I am converting a c program to c++. I changed malloc call to new and I am getting an exception violation. Here is the relevant piece of code. Compiler vc++ 7.0 (.Net 2003) SQLINTEGER nCols; SQLINTEGER cbColDataLength; PBYTE* pColumnData = NULL;
0
12066
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry key 'Temporary (volatile) Jet DSN for process
3
1589
by: Greg Corradini | last post by:
Hello, I'm trying to perform a simple insert statement into a table called Parcel_Test (see code below). Yet, I get an error message that I've never seen before (see traceback below). I've tried to put a semicolon at the end of the sql statement, but with no luck. Any ideas from more experienced mx.ODBC users? CODE TRACEBACK
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.