Re: CRecordset::Open and MySQL (ODBC) - nOpenType ?



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.



.



Relevant Pages

  • RE: Connection error SQLSetConnectAttr failed
    ... I don't think I've ever seen machine and database names be numeric values. ... DSN when you created it. ... | I have an undocumented ODBC driver..Or the supplier at least won't give ... and would prefer to do it via windows service. ...
    (microsoft.public.data.odbc)
  • RE: Run-time error 3011 using Foxpro ODBC
    ... it is enough to just mention the DSN. ... -The constant acTable is ignored unless the database source type is MS ... Dim strConnect As String ... DoCmd.TransferDatabase acImport, "ODBC Database", strConnect,, ...
    (microsoft.public.data.odbc)
  • Inno User Input Form and ODBC DSN
    ... I have a third party application that we currently install to hundreds of ... It is an ODBC System DSN. ... we manually create the ODBC and select the default database ... DSNs and the client will choose the DSN that related to his database. ...
    (microsoft.public.vb.database)
  • Re: Linking to back end on a web server ?
    ... When I do the File--Get External Data and select the DSN, ... "You cannot use ODBC to import from, export to, or link an external ... Microsoft Jet or ISAM database table to your database. ... that DSN-based connection to a DSN-less connection. ...
    (microsoft.public.access.externaldata)
  • Inno User Input Form and ODBC DSN
    ... I have a third party application that we currently install to hundreds of ... It is an ODBC System DSN. ... we manually create the ODBC and select the default database ... DSNs and the client will choose the DSN that related to his database. ...
    (microsoft.public.vb.general.discussion)

Loading