During a few days i could make connection , from then no connection anymore.
Now , i try to start from scratch on a new computer. What i am doing wrong ?
From MySql site dowmload and install MySql\mysql-installer-web-community-5.7.17.0.msi
MySql\mysql-connector-odbc-5.3.7-win32.msi
c:\Program Files (x86)\MySQL\Connector ODBC 5.3 is created , running c:\Program Files (x86)\MySQL\Connector ODBC 5.3\myodbc-installer.exe
myodbc-installer -d -l
Shows a list from drivers , last two from list :
MySQL ODBC 5.3 ANSI Driver
MySQL ODBC 5.3 Unicode Driver
I suppose that i have also to register the ansi driver with
myodbc-installer -d -a -n "MySQL ODBC 5.3 ANSI Driver" -t "DRIVER=myodbc5a.dll;SETUP=myodbc5S.dll"
Respons from the program : Success: Usage count is 3
After that i can use MySql 5.7 Command Line Client , creating some users and databases.
Also tDolphin is working and create some databases with tables , populating them
Using windows ODBC system manager i can add and configure MySql ODBC Driver (MySQL ODBC 5.3 ANSI Driver) .
Data Source Name : MySQL ODBC 5.3 ANSI Driver
TCP/IP Server : ..... Port : 3306
User : Root , PassWord : BRECHT
Test the connection seems ok .
I am sure that user , server , database and password are correct.
Running the FW aplication :
- Code: Select all Expand view
FUNC TestMySqlCon()
local cCon , c
local oCon , oErr , lOk := .F.
cCon := "{MySQL ODBC 5.3 ANSI Driver};Server=localhost;Database=pets;User=root;Password=BRECHT;Option=3;"
Try
oCon := TOleAuto():New( "ADODB.Connection" )
End Try
oCon:CursorLocation := 3 // local cache
TRY
oCon:Open( cCon )
CATCH oErr
? oErr:Description , "Could not open a Connection to Database " , cCon , Procname() , procline() , Procname(1) , procline(1)
Return nil
END TRY
RETURN oCon
I got as error (trying to translate in english) :
[Microsoft][ODBC-driver Manager]The data source name is not found and no default driver specified(0x8004005)
Could not open a connection to Database {MySQL ODBC 5.3 ANSI Driver};Server=localhost;Database=pets;User=root;Password=BRECHT;Option=3;
WHAT AM I DOING WRONG OR WHAT AM I MISSING ?????
Frank