I have 2 connections on 2 different server in the same time .
- Code: Select all Expand view
- #include 'fivewin.ch'
//-------------------------------------------------------------------------------------------
Function Main()
Local oRs ,oCn
// here I open a connection on the server 1
oCn := FW_OpenAdoConnection( { "MYSQL", "xxx.xxx.xxx.xxx", "dbname_1", "user", "pw" }, .t. )
Test("first call")
oRs := FW_OpenRecordSet(oCn, 'table')
oRs:Close()
Test("second call")
oCn:Close()
Return nil
Function Test(cTxt)
Local oCn2
// here I open a connection on the server 2
oCn2:= FW_OpenAdoConnection( { "MYSQL", "yyy.yyy.yyy.yyy","dbname_2", "user", "pw" }, .t. )
// The fist call is correct , I note in the browse : Current Catalog is dbname_2
// The second call is wrong , I note in the browse : Current Catalog is dbname_1 of the Server 1
xBrowse(oCn2,'Server 2 :' + ctxt )
oCn2:Close()
REturn nil
Regards
Maurizio