Solved

ODBC - Invalid Argument

Posted on 1997-04-02
2
679 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now