Using 2 connections to 2 ASE-databases using SYC adapative server enterprice driver

Help!

I have a problem making 2 ASE database connections in 1 application.
I use a default transaction object SQLCA to connect to 1 ASE database
and a self-defined transaction object to connect to the other database.
It is not possible to save such an
application, because when I make a connection in Powerbuilder to both
databases via
an SYC Adaptive Server Enterprise driver en then save it, the tables of
the not active
database are not reckognized. When I make a connection via the ODBC
driver it works,
but other error messages occur. What is the problem with connection to 2
ASE databases
in 1 application. Can anyone please give some advice! I want to use 2
ASE databases
and not 1, so don't say to me to put all the tables in 1 database!

It must be possible, because we use 2 Sybase databases (Enterprise)....

Greetings,
Ferry Kemperman
RDMS
postbox@rdms.com




0
RDMS
7/2/2001 10:11:22 AM
sybase.powerbuilder.connection 3893 articles. 0 followers. Follow

4 Replies
949 Views

Similar Articles

[PageSpeed] 25

It is certainly not a problem to use 2 transaction objects the way you 
describe.  You could connect to ASE, Oracle, Sql Server, and Informix at 
the same time in this same manner.

While I'm unclear as to exactly where you are getting the problem, it seems 
like you are trying to update a datawindow that contains data that needs to 
go to both servers.  In this case, you cannot do this in one update call. 
The datawindow only has a connection to ONE server at a time via the 
SetTransObject call.

If this is the case you are referring to, there is a way around this to do 
what you want. 

If this is not what you are referring to, please post exactly what you are 
trying to do.

Regards,

steve
[TeamSybase]
0
Steve_Katz_
7/2/2001 1:12:45 PM
Hello Steve,

Thanks for the information. I don't use a datawindow, but I make direct updates
to
both databases in one script. I use statements like
UPDATE ... SET ...
WHERE ...
USING ...
with 2 transaction objects to 2 ASE databases.
I have declared 2 transaction object in this way (not exactly, just for
instance)

Tranaction object 1:
sqlca.dbms = "Enterprise"
rest of the properties...
.......
CONNECT USING sqlca;

Transaction object2:
transaction trans2
trans2 = CREATE tranaction
trans2.dbms = "Enterprise"
rest of the properties..
.....
CONNECT USING trans2;

It's impossible for me to save such a script, because it only reckognizes the
tables
of the ACTIVE database connection. I want to use BOTH in one script.
Hopefully this is more clear. When not, I send you a copy of the source
(partly).

Hope you can help me,
Ferry Kemperman
RDMS

"Steve_Katz_[TeamSybase]" wrote:

> It is certainly not a problem to use 2 transaction objects the way you
> describe.  You could connect to ASE, Oracle, Sql Server, and Informix at
> the same time in this same manner.
>
> While I'm unclear as to exactly where you are getting the problem, it seems
> like you are trying to update a datawindow that contains data that needs to
> go to both servers.  In this case, you cannot do this in one update call.
> The datawindow only has a connection to ONE server at a time via the
> SetTransObject call.
>
> If this is the case you are referring to, there is a way around this to do
> what you want.
>
> If this is not what you are referring to, please post exactly what you are
> trying to do.
>
> Regards,
>
> steve
> [TeamSybase]

0
RDMS
7/3/2001 8:33:25 AM
I understand the problem now.  Thanks for the explanation.

I don't think there is a way to do this with embedded SQL.  You can wrap 
your update statement into a string variable and use Execute Immediate 
:ls_sql using trans_obj;  Since the sql is inside a string, PB doesn't try 
to validate it.

Take a look in the help file under Dynamic SQL for the 4 different formats 
(depending upon number of parms and result sets).  If you are just doing an 
update with no parms (since you built them into the string, for example), 
format 1 should work.

HTH,

steve
[TeamSybase]
0
Steve_Katz_
7/3/2001 12:53:32 PM
I appears that the problem is with the IDE doing DB validation and not the
actual embedded SQL script.

Option #1 -

Try turning off the database warnings in the objects editor Menu Select
Design / Options / and then the Script Tab.
This will allow you to save the object, but you must catch the syntax errors
at run time.  Same result as the dynamic SQL.

Option #2 -

Create two NVO's to do updates and place each SQL script in its own
function.
Before editing each object, switch the DB connection in PB to the
appropriate one.
Syntax will be validated against the correct database and you get the
benefit of design time syntax checking.

Your script that drives the updating of both database's will just call the
approprate NVO's.


<Steve_Katz_[TeamSybase]> wrote in message
news:8CFC81FD3618BA0E0046D1AD85256A7E.0031851385256A7E@webforums...
> I understand the problem now.  Thanks for the explanation.
>
> I don't think there is a way to do this with embedded SQL.  You can wrap
> your update statement into a string variable and use Execute Immediate
> :ls_sql using trans_obj;  Since the sql is inside a string, PB doesn't try
> to validate it.
>
> Take a look in the help file under Dynamic SQL for the 4 different formats
> (depending upon number of parms and result sets).  If you are just doing
an
> update with no parms (since you built them into the string, for example),
> format 1 should work.
>
> HTH,
>
> steve
> [TeamSybase]


0
David
7/4/2001 1:19:15 AM
Reply:

Similar Artilces:

Can not connect to ASE 12.0 using jConnect 5.2 using XA transactions #2
I am trying to connect to ASE 12.0 using jConnect 5.2 (SybXADataSource) to make XA transaction calls. I have a stand alone java client 1. Set Data Source to be SybXADataSource I set my properties ds.setPassword(""); ds.setUser(""); ds.setNetworkProtocol("Tds"); ds.setDatabaseName("master"); ds.setResourceManagerName("connection"); ds.setResourceManagerType(1); ds.setServerName("172.18.40.174"); ds.setPortNumber(4100); ...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. Sorry, is the the correct place to post my question? any TeamSybase member can help? Thanks Tony I thin...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. ...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. Please see you original post. Tony wrote: > We have powerbuilder 10.2, it use i-connect 2.8.1 to connec...

How to connect to 2 database using one Connection at a time
Just assume,I have 2 databases configured in single sql server and each database contains one table. Now my requirement is to join these 2 tables which are in 2 different database. This is something like under .\sqlexpress we can see many database like Northwing,DB1 and DB2  etc.... Now i want to join 2 tables from different databases. Here i know the SQL join query but my problem is to create the Connection string....i dont know how to create one connection string that connects to these 2 database and gives me the output.Am trying it in  VB6 ........

Connect to 2 databases, but no use 2 phase commit
I have a component submitted to the thread manager a service component that wakes and sleeps. When it wakes, it should connect to multiple connection caches, gather some statistics, update a value and then disconnect and move to the next connection cache. It's giving me errors about 2-phase commit. I understand why I get the error. If I don't care about 2 phase commit (if one update fails, the other can commit, data integrity is no real concern here since the update is basically just "I was here" - not mission critical) can I do this with one component call, or...

Powerbuilder components use only 1 connection from connection cache #2
Hi all, I'm currently investigating a performance bottleneck in jaguar. I've reported this problem before and got some helpful hints from this forum so I'm back for more, since the hints weren't helpful enough. I have a web application which uses Powerbuilder components as the backend. Even when I generate 30 calls that each take 1 minute, the Jaguar server reports that it uses only one connection!! When I check oracle, it reports that only one session is active from the Jaguar server. Now I can just handle this if it was only one session but when i tested this f...

Problem connecting 2 databases in the same machine. One database is running in a LAN the other in WAN, both are using NT SERVER...
Hi!!!! SQL ANYWHERE 5.5.04 Build #1867. It is possible to connect from one machine to two databases, one in a LAN another in a WAN??? I can open my WAN database alone, only. I can open my LAN database alone, only. But, If I have the WAN open and try to open the LAN db I get a connection error. If I have a LAN open and try to connect to my db in the WAN. I get a connection error. Is this possible? Do I need some special parameters??? Jos´┐Ż R. Rivera Did you try the things I suggested in my reply to your Saturday mail? Regards, Thomas Sandberg, GraFu AB Jose ...

Connect 2 databases on 2 servers ???
 Hi, If you have  2 databases with the exact same table columns, and in the first database in a table column the indentidy seed starts at 1 and finishes at 32,000 can you attatch a second database so that the indentity starts at 32,001and carries on. What happens if you create a site and run out of disk space and need to attach another database which is located on another server??? I am really confused about this.Hope someone can give some links to some articles about this as I can't find any information about it.How can this be done? Thanks Success com...

Can not connect to ASE 12.0 using jConnect 5.2 using XA transactions
I am trying to connect to ASE 12.0 using jConnect 5.2 (SybXADataSource) to make XA transaction calls. I have a stand alone java client (using JDK 1.3.0) which does the following steps: 1. Set Data Source to be SybXADataSource 2. Set properties ds.setPassword(""); ds.setUser(""); ds.setNetworkProtocol("Tds"); ds.setDatabaseName("master"); ds.setResourceManagerName("connection"); ds.setResourceManagerType(1); ds.setServerName("172.18.40.174"); ds.setPortNumber(4100); 3. getXAConnection at this poin...

Can not connect to ASE 12.0 using jConnect 5.2 using XA transactions #3
I am trying to connect to ASE 12.0 using jConnect 5.2 (SybXADataSource) to make XA transaction calls. I have a stand alone java client 1. Set Data Source to be SybXADataSource I set my properties ds.setPassword(""); ds.setUser(""); ds.setNetworkProtocol("Tds"); ds.setDatabaseName("master"); ds.setResourceManagerName("connection"); ds.setResourceManagerType(1); ds.setServerName("172.18.40.174"); ds.setPortNumber(4100); ...

making 3.6.1 use jdk1.2 to connect oracle jdbc 2.0 driver
Hi, I have EAS 3.6.1, downloaded a few days ago for Windows 2000. I also have Oracle's latest drivers in my classpath - the drivers that work with jdk1.2 Here is what happens: When I start the server, and tell it to use jdk1.1, it works perfectly - my connection cache pings fine - even though I only have Oracle's JDBC2.0 driver in my classpath. However, when I start the server with jdk1.2, which I want to use, it gives me an error when I ping the connection cache! What gives? Am I missing something? To summarize: Jaguar with jdk1.1 works with Oracle's jdk1.2 based ...

When using MS-ADO to connect to ASE using ASE OLEDB/ODBC driver the record count is -1
Hi VB 6 application connecting to ASE 12.5 (NT) using OLEDB/ODBC drivers. Gets a problem. He retrieve rows from the database - WORKS Fine!!! But as soon as he wants to see how many rows was returned the recordcount returns -1. He gets this problem connecting using ODBC and OLEDB. He gets the recordcount from the recordset object's recordcount property. This is what I found on the MSDN online manuals: RecordCount Property - ADO Indicates the current number of records in a Recordset object. Applies To Recordset Remarks Use the RecordCount property to find out how many r...

Connection to Informix using IBM Informix Connect 2.81
Hello, I have a problem to communicate with my Informix database using "IBM Informix Connect 2.81". I have no problems using "IBM Informix Connect 2.20", but this driver is very old now, has some performance problems and should not be used with Windows XP. In my client server application I have to set the options "Cursor Library as needed" and "Disable Bind" in my database profile (DBparm for the executeable) to use the new Informix driver, but I have no idea how to set these options in the EAServer. I am using EAServer Version 5.2. Than...

Web resources about - Using 2 connections to 2 ASE-databases using SYC adapative server enterprice driver - sybase.powerbuilder.connection

SAP patches login flaw in ASE database
SAP patched a flaw on Thursday that could allow an attacker to take complete control over a database, according to security vendor Trustwave. ...

SAP patches ASE database login flaw
SAP patched a flaw on Thursday that could allow an attacker to take complete control over a database, according to security vendor Trustwave. ...

Login Vulnerability Exposes SAP ASE Databases
... software company SAP has patched a vulnerability in SAP Adaptive Server Enterprise (ASE) that allows an unauthorized user to access the database ...

SAP Goes After Oracle's Database With ASE
SAP will finish porting its ERP (enterprise resource planning) application to the Sybase Adaptive Server Enterprise (ASE) database later this ...

Resources last updated: 12/15/2015 7:15:23 AM