FW_OpenAdoConnection problem with 2 connections

FW_OpenAdoConnection problem with 2 connections

Postby Maurizio » Thu Feb 01, 2018 5:38 pm

Hello
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
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW_OpenAdoConnection problem with 2 connections

Postby nageswaragunupudi » Thu Feb 01, 2018 7:08 pm

We are looking into this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW_OpenAdoConnection problem with 2 connections

Postby nageswaragunupudi » Tue Feb 13, 2018 4:13 pm

Fixed in FWH 1801.
Many thanks for pointing out.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW_OpenAdoConnection problem with 2 connections

Postby Maurizio » Wed Feb 14, 2018 2:50 pm

User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW_OpenAdoConnection problem with 2 connections

Postby damianodec » Wed Feb 27, 2019 9:13 am

hI,
I have the same error,
how can I to solve it with FiveWin for xHarbour 17.09 - Sep. 2017 ?
thanks
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: FW_OpenAdoConnection problem with 2 connections

Postby damianodec » Wed Mar 06, 2019 9:22 am

hi, no news?
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: FW_OpenAdoConnection problem with 2 connections

Postby nageswaragunupudi » Thu Mar 07, 2019 7:53 am

Mr. damianodec

Please see the
function Fw_OpenAdoConnection
in \fwh\source\function\adofuncs.prg

You will find this code
lines 90 to 94
Code: Select all  Expand view
//   if ( ! Empty( cSpec ) .and. cSpec == scSpec ) .or. cConnStr == scStr1 .or. cConnStr == scStr2
   if If( Empty( cSpec ), cConnStr == scStr1 .or. cConnStr == scStr2, cSpec == scSpec )
      soCn_Check()
      return soCn
   endif
 


and lines 100 to 103
Code: Select all  Expand view
  if ( ! Empty( cSpec ) .and. cSpec == scSpec ) .or. cConnStr == scStr1 .or. cConnStr == scStr2
      soCn_Check()
      return soCn
   endif
 


Please comment out both.
Let me know if this works.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW_OpenAdoConnection problem with 2 connections

Postby damianodec » Tue Mar 12, 2019 10:02 am

hi Mr. Rao,
In these days I'm out of Office, I'll try it..
thank you very much!
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests