How to connect to mutiple remote Gupta sql base server concurrently using Gupta sql base odbc driver

comp.databases.gupta (1995-2015)
Anuj

How to connect to mutiple remote Gupta sql base server concurrently using Gupta sql base odbc driver

Post by Anuj » 15 Feb 2006, 15:09

 Posted by:  Anuj <anuj.s...@mphasis.com> 

Hey,
I am Anuj.
Facing problem in establishing concurrent connections with multiple
gupta sql Base server .

We have created 2 Gupta sql base server's(By installing the Gupta sql
base server on two machines) and trying to access those two server's
from our application(This application is running on third machine)
which is written in C++, using Gupta Sql BaseODBC Driver to connect
with the Gupta Sql Base server .

Requirement : Our requirement is to connect multiple Gupta Sql Base
Servers concurrently from our client Application (Developed in Borland
C++ ) by using Gupta Sql BaseODBC Driver and fetch the Records from
those connected servers.Client Application runs on the Remote machine
where Gupta SQL base Server is not installed but only Gupta SQL base
ODBC Driver is installed.


Approach we are following:

In our application we have created two ADO connection object and two
ADO dataset .Each one ADO connection, ADO Dataset is connecting to one
Gupta sql server.

Problem we are facing:
The problem we are facing is at one point of time only one connection
can fetch the records from the Database.If we try to fetch the record
from other connection while the first connection is open it's giving
error "[Gupta][ODBC Driver} Invalide Attribute/option identified".

If we close the earlier established connection before fetching the
records by second connection ,we are getting the records.

Please let us know whether Gupta SQL supports concurrent connection to
multiple Servers running on Different machines. If it is please let us
know the steps to proceed. An early response will be highly
appreciated.

The code we are using for that is as follows

ADOConnection_1=new TADOConnection(Application);
ADODataSet_1 =new TADODataSet(Application);
AnsiString szConnectionString_1 ="Driver=Gupta
SqlBase;DB=EmStore2;INI=d:\connection1.ini;UID=sysadm;PWD=sysadm;IL=CS;IMS=400;LTO=1800";
ADOConnection_1->ConnectionString=szConnectionString_1;
ADOConnection_1->Open();
ADODataSet_1->Connection=ADOConnection_1;
ADODataSet_1->Active=false;
ADODataSet_1->CommandText="select MAX(receipt_id) from
sysadm.receipt";
ADODataSet_1->Active=true;
AnsiString receipt_id_1=NULL;
receipt_id_1=
ADODataSet_1->Fields->FieldByName("MAX(receipt_id)")->AsString;

ADOConnection_1->Close(); //if we use this it's working fine other
wise not
ADODataSet_1->Close(); //if we use this it's working fine other
wise not

//For getting records from Connection_2
ADOConnection_2=new TADOConnection(Application);
ADODataSet_2 =new TADODataSet(Application);
AnsiString szConnectionString_2 ="Driver=Gupta
SqlBase;DB=EmStore11;INI=d:\connection2.ini;UID=sysadm;PWD=sysadm;IL=CS;IMS=400;LTO=1800";
ADOConnection_2->ConnectionString=szConnectionString_2;
ADOConnection_2->Open();
ADODataSet_2->Connection=ADOConnection_2;
ADODataSet_2->Active=false;
ADODataSet_2->CommandText="select MAX(receipt_id) from
sysadm.receipt";
ADODataSet_2->Active=true;
AnsiString receipt_id_2=NULL;
receipt_id_2=
ADODataSet_2->Fields->FieldByName("MAX(receipt_id)")->AsString;


The content of connection1.ini file is

[win32client]
clientname=172.20.59.86
[win32client.dll]
comdll=SQLWS32
;comdll=SQLAPIPE
[win32client.ws32]
serverpath=SERVER1,172.20.59.86,2155/*

The content of connection2.ini file is

[win32client]
clientname=172.20.59.45
[win32client.dll]
comdll=SQLWS32
;comdll=SQLAPIPE
[win32client.ws32]
serverpath=SERVER1,172.20.59.45,2155/*

Niels Allerheiligen

Re: How to connect to mutiple remote Gupta sql base server concurrently using Gupta sql base odbc driver

Post by Niels Allerheiligen » 16 Feb 2006, 16:10

 Posted by:  Niels Allerheiligen <nallerheilige...@genese.de> 

Hi Anuj.

Anuj schrieb:

[...]


[...]


Yes, connections to multiple databases on multiple servers are supported.


Which version of SQLBase and ODBC driver do you use?
The error message sounds as if multiple recordsets don't work. I'm not
quite sure where the problem is, though.

-Niels-

Anuj

Re: How to connect to mutiple remote Gupta sql base server concurrently using Gupta sql base odbc driver

Post by Anuj » 17 Feb 2006, 05:38

 Posted by:  Anuj <anuj.s...@mphasis.com> 

Hi Niels,

I am using Gupta sql base server 9.0.1 and Gupta sql base Odbc driver
9.0.1.

thanks
Anuj

Return to “comp.databases.gupta”

Who is online

Users browsing this forum: [Ccbot] and 0 guests