Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?
- From: "Guido Schlenke" <galerius@xxxxxx>
- Date: Thu, 19 Jul 2007 17:09:34 +0200
Paul,
in between I too believe that there is nothing wrong with my code. After
your message I tried out several things:
1. VS2005:
I started a new application through the steps of the assistant with ODBC
database support. The assistant "hangs" at the step where the DSN has to be
specified. This means the DSN would be shown but not accepted. It opened the
ODBC Datasource Administrator and after clicking ok the selected DSN wasn't
shown. At this point I stopped the procedure.
2. VC 6.0:
The above steps in VC6 were absolved without any error. The application
frame was builded successfully, and after placing of some Edit controls into
the FormView the Build process was successful. The program started and I
could navigate over my data records very well. I had to take 'snapshot' as
nOpenType (type 'dynaset' produced a runtime error like "...odbc driver
doesn't support dynasets...").
3. VS2005:
Then I tried to configure a recordset with a table name in the open call
(first as dynaset, compile and build ok - the application exits with a
runtime error although I put the Open() call into a try - catch block; then
as snapshot: same behaviour; then forwardOnly: same behaviour).
Now I think that my version of VS2005 isn't able to access a MySQL database
through an ODBC DSN with a minimum of comfort - very bad.
Guido.
"Paul S. Ganney" <paul.ganney@xxxxxxxxxx> schrieb im Newsbeitrag
news:1184577279.388317.38260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Guido,
I can't see anything wrong with your code. I therefore suspect it's
the ODBC connection that is forcing the forward-only. Try a similar
exercise with an ODBC connection to an Access database - that may show
up the error.
I usually use ClassWizard to create my CRecordsets, and therefore just
call Open() with no parameters. It might be worth trying this, just in
case.
Paul.
.
- References:
- CRecordset::Open and MySQL (ODBC) - nOpenType ?
- From: Guido Schlenke
- Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?
- From: Paul S. Ganney
- Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?
- From: Guido Schlenke
- Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?
- From: Paul S. Ganney
- CRecordset::Open and MySQL (ODBC) - nOpenType ?
- Prev by Date: Slow Recordset.Open() and Recordset.Update() in table imported into msde.
- Next by Date: Database Components Missing
- Previous by thread: Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?
- Next by thread: Re: Best Practise: MFC VC++ app data access SQL Server 2005
- Index(es):
Relevant Pages
|
Loading