Connect Mysql

General discussion forum about all databases other than SqlBase.

Connect Mysql

Post by grant » 19 Apr 2013, 15:14


Can connect to MySQL? if so thank you to tell me how


Posts: 225
Joined: 08 Mar 2017, 09:51
Location: Austria

Re: Connect Mysql

Post by clemdoc » 23 Apr 2013, 11:32

Off the top of my head, as it's been some time (and using TD52):

- Create an ODBC Data Source to your MySQL Server (requires MyODBC connector).
- Add the following to your SQL.INI:
sqlodb32 must be listed *before* sqlws32
- Set SqlDatabase, SqlUsername und SqlPassword according to your situation and call SqlConnect.
- You should be done.

You'll probably find more postings about MyQL in this bb. Experiment and have a look at the other settings for SQL.INI. Pay attention to various datatypes, I remember finding it convenient to convert integers to strings as part of the sql statement (I think some truncation was going on).

hth, clem


Re: Connect Mysql

Post by Dwza » 04 Dec 2013, 12:18

sorry for getting this post up again but all my tries fail to connect :(

by the time im using TD6.2 but i guess this has nothing to say... at least in this case it doesn't.

OS: windows 7
Apache: xampp 1.8
IDE: TD6.2

DB: Centura
User: gupta
Password: 123456
Permissions: ALL PRIVILEGS

Adds to sql.ini:


Added MySQL-ODBC Driver to MyODBCConnector


Code: Select all

On SAM_CreateComplete
   ! ODBC-Data
   Set SqlDatabase = "centrua"
   Set SqlUser = "gupta"
   Set SqlPassword = "123456"

Code: Select all

On SAM_Click
   If SqlConnect( MySQL_handle )
      ! (connection established)
      Call DebugMessage( "Verbindung wurde hergestellt" )
      ! (connection failed)
      Call DebugMessage( "Verbindung leider fehlgeschlagen"
All what i get is connection failed and sqlbase window pops up and says:
cannot open database
number: 401
FOR SQLBASE: The specified database cannot be found. SQLBase cannot find the file named "x:\dbdir\dbname\dbname.DBS" where
x:\dbdir is either the default, c:\SQLBASE, or modified with the DBDIR SQL.INI configuration keyword.
In a multiuser network configuration, this error indicates that your network is working correctly, but the database system was unable to
locate the specified database filename.

FOR NON-SQLBASE DATABASES: This problem can also occur with a SQLGateway when leaving out the protocol type in the SERVERNAME
parameter that the client uses to communicate with the gateway (like SQLNBIOS). For example,


will nott allow a remote client process (using SQLNBIOS on the LAN to communicate with the SQLGateway machine) to connect to the SQLGateway machine.

For SPX connectivity from DOS or MS Windows to a Unixware SQLBase Server check for the omission of the "serverpath=..." parameter in the SQL.INI file under the client section.

Remedy: Verify the database file exists. The default drive letter and dbdirname is c:\SQLBASE unless overridden with a DBDIR SQL.INI
configuration keyword parameter. Verify the DBDIR keyword is not missing or pointing to a wrong database directory. Verify
the DBNAME keyword is specified for the named database. Verify the SERVER keyword is not missing or conflicting with other
network server names. In your CONFIG.SYS file, verify at least 40 files set with the FILES=40 parameter. If the server was
being initialized while the connection was tried, retry the connection after the server has initialized. If all of the
above fails, try using a different database name or try connecting to the database in single user mode at the same
machine. If you can connect with a local engine it probably indicates a network configuration error exists. If you can
connect with a new database name it probably indicates a previously named database was never properly initialized.
Option to Continue or Stop DB
On Continue i get Connection failed

Can someone help me there ?

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest