Connection MySQL through ADO with MyOLEDB provider
- From: "Mehran Ziadloo" <mehran20@xxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 17:34:22 +0430
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
.
- Follow-Ups:
- Re: Connection MySQL through ADO with MyOLEDB provider
- From: Stephen Howe
- Re: Connection MySQL through ADO with MyOLEDB provider
- Prev by Date: RE: can not connect to the mdb database
- Next by Date: Two related combo's in ASP
- Previous by thread: DataBinding Exception
- Next by thread: Re: Connection MySQL through ADO with MyOLEDB provider
- Index(es):
Relevant Pages
|
|