Solved

ODBC - Invalid Argument

Posted on 1997-04-02
2
685 Views
Last Modified: 2013-11-20
I am using several recordsets in an application using VC++ and Access7 ODBC.  Each one is filtered according to user input from a dialog box.  The data is then retrieved and processed.  For example I preform a filtered query on recordset X.  For each record in X a filtered query is executed on Y.  Sometimes I get an Invalid Arguement message as a result of a  the following exceptions

Invalid argument.
First-chance exception in Mrgis.exe (ODBCCR32.DLL): 0xE06D7363: Microsoft C++ Exception.
State:S1093,Native:-1003,Origin:[Microsoft][ODBC Microsoft Access 7.0 Driver]

First-chance exception in Mrgis.exe (MFCD42D.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in Mrgis.exe (MFCD42D.DLL): 0xE06D7363: Microsoft C++ Exception.

This only happens occassionaly even when I'm using the same input.

In addition I always get the following exceptions , even when the query works.

Warning: ODBC Success With Info, Driver's SQLSetConnectOption failed
State:IM006,Native:0,Origin:[Microsoft][ODBC Driver Manager]

Driver not capable
State:S1C00,Native:84,Origin:[Microsoft][ODBC Driver pack 2.0 Driver]

DBMS: ACCESS
, Version: 3.0

The error occurs when I try to Open the recordset

What could be happening?

Thanks ,
Rick
0
Comment
Question by:Ricky031497
2 Comments
 

Author Comment

by:Ricky031497
ID: 1300810
Edited text of question
0
 
LVL 1

Accepted Solution

by:
rhgaracci earned 50 total points
ID: 1300811
I suspect that the number of ?'s in your m_strFilter string does not match the value of m_nParams.  If you use different filter strings, you need to change the value of m_nParams accordingly.

With regard to the second set of messages, it is difficult to tell what is going on without seeing the code (options on Open() etc.)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question