Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ODBC - Invalid Argument

Posted on 1997-04-02
2
Medium Priority
?
695 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 100 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

916 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