ODBiC Discussion Board

RE: MySQL 4.1.8 and ODBC connector, Louis, 01-14-2005

You can use any keyword the driver recognizes, but...

by Roger Harris, January 14, 2005 07:20

The connection string that you specify with the DATABASE statement is just passed to the ODBC driver manager (through a library function named SQLDriverConnect). So, you can use any keyword the MySQL driver will recognize. (I'm not sure if it recognizes the USE keyword, but the connection string keywords should be in the documentation.)

But, anyway, running under Win2000/2003 or XP, you won't be able to use the "DSN-less" type of connections with ODBscript, because CGI programs don't have the permission required to create the necessary Registry entries. Under those systems, you will need to set up a System DSN. From the Control Panel, select "Administrative Tools," then "Data Sources (ODBC)," then the "System DSNs" tab (this is important; a User DSN won't work from a CGI), then click the "Add" button. In the next window, you can select a driver, and if you have installed the MySQL driver, it will be in the list. Select that driver and click "Finish," and then you will have a window to specify the DSN name you want to use, the host where the server is running (you can use "localhost" if it's the same machine), and the database name.

Then, for your ODBscript DATABASE statement, you can use "DSN=yourDSNname, UID=userID, PWD=password."


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.