List:MySQL ODBC« Previous MessageNext Message »
From:Michael Widenius Date:September 15 1999 9:39am
Subject:ODBC Connect String
View as plain text  
>>>>> "Serge" == Serge Paquin <serge@stripped> writes:

Serge> Ok more research and I found parameters that helped me.  Now I'm going to up the
> anti.

Serge> Is their any way to create an ODBC connect string that does not require you to
> have a DSN created?

Serge> ie.

Serge>
> ODBC;DRIVER=MySQL;UID=mysql;PWD=mysql;DATABASE=testdb;SERVER=192.168.0.2;OPTION=1

Try changing DATABASE to DB !

You can check the MyODBC options from the following piece of code in MyODBC:

    pos=strxmov(buff,
                "DSN=",lpsetupdlg->aAttr[KEY_DSN].szAttr,
                ";DB=",lpsetupdlg->aAttr[KEY_DB].szAttr,
                ";SERVER=",lpsetupdlg->aAttr[KEY_SERVER].szAttr,
                ";UID=",lpsetupdlg->aAttr[KEY_USER].szAttr,
                ";PWD=",lpsetupdlg->aAttr[KEY_PASSWORD].szAttr,
                ";PORT=",lpsetupdlg->aAttr[KEY_PORT].szAttr,
                ";OPTION=",lpsetupdlg->aAttr[KEY_FLAG].szAttr,
                ";STMT=",lpsetupdlg->aAttr[KEY_STMT].szAttr,
                ";",NullS);


Serge> I've tried a few different combinations but if I don't have a DSN name already
> created in the control pannel I get the MySQL ODBC settings screen.

Regards,
Monty
Thread
ODBC Connect StringSerge Paquin10 Sep
  • ODBC Connect StringMichael Widenius15 Sep