SQLExpress - Xb2.NET     ot4xb  
   Announcement      Free XUG Meeting Toronto/Canada (May 25, 2008)       [ More Info ... ]
sqlexpress
little problem with 3.2.01 library
Thread Starter: giuseppe Started: 6/11/2007 6:05 PM UTC
Replies: 1
little problem with 3.2.01 library
Hi,
I've installed sqlexpress library v. 3.2.01
after the excution of  few statements I lost connection
to MySql DBMS (with new and old ODBC drivers)
with old library 3.0 it's all ok
this is my function to connect to DBMS

L_Connection := "Driver=MySQL ODBC 3.51 Driver"
L_Connection += ";UID=airsoft"
L_Connection += ";PWD=mypwd"
L_connection +=" ;server=localhost"
L_connection +=" ;database="
local_conn := SQLConnection():new()
if .not. local_conn:driverConnect(nil, L_Connection,.t.)
// test also with ==>  if .not. local_conn:driverConnect(nil, L_Connection,,.t.)
    return .f.
endif
return .t.
in this way I install only the ODBC without configure it (it's better for my customers).

to work now, I must create a System DNS ODBC
and configure it with 'enable Auto Reconnect'.

thanks in advance
Giuseppe Correnti
Re: little problem with 3.2.01 library
"giuseppe" <airsoft1@tin.it> wrote in
news:viyn6gqrk1of6nu.110620072005@VDS-472773:  

I've installed sqlexpress library v. 3.2.01
after the excution of  few statements I lost connection
to MySql DBMS (with new and old ODBC drivers)
with old library 3.0 it's all ok

There should be absolutely no difference between the versions. It may just be a coincidence that you lost the connection.

this is my function to connect to DBMS
L_Connection := "Driver=MySQL ODBC 3.51 Driver"
L_Connection += ";UID=airsoft"
L_Connection += ";PWD=mypwd"
L_connection +=" ;server=localhost"
L_connection +=" ;database="
local_conn := SQLConnection():new()
if .not. local_conn:driverConnect(nil, L_Connection,.t.)
// test also with ==>  if .not. local_conn:driverConnect(nil, L_Connection,,.t.)
    return .f.
endif
return .t.
in this way I install only the ODBC without configure it (it's better
for my customers).
to work now, I must create a System DNS ODBC
and configure it with 'enable Auto Reconnect'.

I'm sure you can specify this param in the connect string. The trick is to find out what the param is called. To find out how to do that, please see slide #8: http://www.sqlexpress.net/sqlxpp/SQLXpp.ppt

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools