Connection MySQL through ADO with MyOLEDB provider



Hi,
Recently I have tried to develope a software using VC++ MFC and MySQL Data
Server. After I searched the web I found out that there's an ADO provider
for MySQL named MyOLEDB. So I started working with it.
Everything was fine, I tried most of the queries such as select, updata,
delete and insert into and it was all fine. Till recently I added a where
cluase to my select query, by this act I got an unhandled exception on
run-time which says there's a user breakpoint!! It gives out this exception
in the line of opening my recordset:

try {
command->CommandText = query.data();
recordset->Open ( (IDispatch *) command, vtMissing, adOpenStatic,
adLockBatchOptimistic, adCmdUnknown);
}

Something funny is that even I placed the code in try block and have a
catch(...) but I can't catch the exception!! Well if it's really a
breakpoint then it makes sense but I didn't put a breakpoint there.
If I give it the query: "SELECT fldName FROM tblProjects;", it works fine
but with query: "SELECT fldName FROM tblProjects WHERE fldID = 9;" I'll get
the exception. Well I don't know if there's a problem with my code or
MyOLEDB?!

I hope someone can help me cause I don't know what to do and I really need
this.
Thanks,
Mehran Ziadloo


.



Relevant Pages

  • Re: Create COM component via late binding
    ... I set the breakpoint in the c++ constructor, and launched the C# client. ... it launched an instance without hitting the breakpoint. ... first chance exception to see if there is any exception.. ... Customer Service and Support for a faster resolution. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Thread exiting with code 1282 (0x502)
    ... This software it is a huge legacy MFC application that we have to ... I'm talking about setting a breakpoint on the ... exception trapping on the thread ... I have an MFC application that started exiting with exit code 1282 ...
    (microsoft.public.vc.mfc)
  • Re: Thread exiting with code 1282 (0x502)
    ... Whenever you use sizeofof a text buffer it must ALWAYS be coded as ... I'm talking about setting a breakpoint on the ... exception trapping on the thread ... I have an MFC application that started exiting with exit code 1282 ...
    (microsoft.public.vc.mfc)
  • Re: Thread exiting with code 1282 (0x502)
    ... I am not an MFC programmer so this code actually causes me physical pain :-). ... I'm talking about setting a breakpoint on the API entry point. ... What I find odd is that the threads AND the app both exit with the same exit code. ... exception trapping on the thread ...
    (microsoft.public.vc.mfc)
  • Re: Thread exiting with code 1282 (0x502)
    ... I am not an MFC programmer so this code actually causes me physical pain :-). ... I'm talking about setting a breakpoint on the API entry point. ... What I find odd is that the threads AND the app both exit with the same exit code. ... exception trapping on the thread ...
    (microsoft.public.vc.mfc)