Forgive my comment if I may offend you ... looking at \source\function\adofuncs.prg ( built into all FW builds )
- Code: Select all Expand view
static saProviders := { ;
{ "DBASE", "OLEDB", { "Microsoft.ACE.OLEDB.12.0", "Microsoft.Jet.OLEDB.4.0" }, "Extended Properties=dBASE III" }, ;
{ "MSACCESS", "OLEDB", { "Microsoft.ACE.OLEDB.12.0", "Microsoft.Jet.OLEDB.4.0" }, "" }, ;
{ "MSSQL", "OLEDB", { "MSOLEDBSQL", "SQLNCLI11", "SQLNCLI10", "SQLNCLI", "SQLOLEDB" }, "" }, ;
{ "MYSQL", "ODBC", { "Provider=MSDASQL;Driver={MySQL ODBC 8.0 ANSI Driver}", ;
"Provider=MSDASQL;Driver={MySQL ODBC 5.3 ANSI Driver}", ;
"Provider=MSDASQL;Driver={MySQL ODBC 5.2w Driver}", ;
"Provider=MSDASQL;Driver={MySQL ODBC 5.2 ANSI Driver}", ;
"Provider=MSDASQL;Driver={MySQL ODBC 5.1 Driver}", ;
"Provider=MSDASQL;Driver={MySQL ODBC 3.51 Driver}" }, "Option=3" }, ;
{ "ORACLE", "OLEDB", { "MSDAORA", "OraOLEDB.Oracle" }, "" }, ;
{ "SQLITE", "ODBC", { "Provider=MSDASQL;Driver=SQLite3 ODBC Driver" }, "" }, ;
{ "FOXPRO", "OLEDB", { "vfpoledb" }, "" }, ;
{ "POSTGRE", "OLEDB", { "PostgreSQL OLE DB Provider" }, "" }, ;
{ "INFORMIX" }, ;
{ "ANYWHERE" } ;
}
It appears MySql needs an ODBC driver(s) to connect to your database .. When I was in State Gov I wrote Sql programs for over 5 thousand users and it seemed almost impractical to make sure the correct ODBC driver and configuration was loaded on each desktop .. In my opinion ODBC is a lot of configuration overhead .. where OLEDB or Microsoft.Jet.OLEDB.4.0 is built into EVERY Microsoft Windows operating system .. there is no verification needed if the workstation does not have ODBC loaded or configured properly and what if you have a "cranky" Windows desktop that intermittently decides to fail ( perhaps in your situation ) connecting or staying connected to your server ..
Using MS Access with .MDB is a great local database for smaller user apps .. and Ms Sql Server for Enterprise applications is FREE for less than 100 users or so and all the ADO ( ole ) drivers are already incorporated into the Windows Operating system .. and FREE is good and having the OLE drivers already present on every Windows desktop is a blessing .. I would seriously consider using Ms Access or MS Sql server for your database .. it will save you a lot of ( connection ) headaches .. have a look at and compile \samples\AdoRick.prg ..
Just a quick suggestion .. Rick Lipkin
ps .. if you are connecting with OLEDB\Sqloledb please dis-regard my comments ..