Who can give me a simple example on Jaguar component connect to a connection cache?

My script is:
SQLCA.DBMS="SYJ"
SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"

CONNECT USING SQLCA;

If SQLCA.SQLCode<>0 Then
 ErrorLogging errlog
 this.GetContextService("ErrorLogging",errlog)
 errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
 is_info=SQLCA.SQLErrText
End If

ids_emp=Create DataStore
ids_emp.DataObject="d_emp"
ids_emp.SetTransObject(SQLCA)

But the srv.log report:
Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid Database
Connection from Jaguar yet no error was returned from the Jaguar Server!



0
Jack
7/25/2001 1:36:25 AM
sybase.easerver.powerbuilder 3902 articles. 0 followers. Follow

5 Replies
666 Views

Similar Articles

[PageSpeed] 10

see
http://www.powerobjects.com/jaguar.htm

Jerry neppl
PowerTeam Inc

"Jack Zhang" <jack.zhang@dingtech.com.cn> wrote in message
news:I18Bw2KFBHA.264@forums.sybase.com...
> My script is:
> SQLCA.DBMS="SYJ"
> SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"
>
> CONNECT USING SQLCA;
>
> If SQLCA.SQLCode<>0 Then
>  ErrorLogging errlog
>  this.GetContextService("ErrorLogging",errlog)
>  errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
>  is_info=SQLCA.SQLErrText
> End If
>
> ids_emp=Create DataStore
> ids_emp.DataObject="d_emp"
> ids_emp.SetTransObject(SQLCA)
>
> But the srv.log report:
> Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid
Database
> Connection from Jaguar yet no error was returned from the Jaguar Server!
>
>
>


0
Jerry
7/25/2001 4:02:33 AM
Have you made sure the cache is setup correctly in jaguar manager and
that you can ping the cache?

Also you may want to tag a SQLCA.Database='xxx' before connecting to
make sure you are getting the database you want and not the default
database on the server.

Another thing I check when having problems is that I can connect to the
database from the Jaguar machine using PB or SQLAdvantage. If you cant
do this then Jaguar wont have any luck either ;-)

A.

Jack Zhang wrote:
> 
> My script is:
> SQLCA.DBMS="SYJ"
> SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"
> 
> CONNECT USING SQLCA;
> 
> If SQLCA.SQLCode<>0 Then
>  ErrorLogging errlog
>  this.GetContextService("ErrorLogging",errlog)
>  errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
>  is_info=SQLCA.SQLErrText
> End If
> 
> ids_emp=Create DataStore
> ids_emp.DataObject="d_emp"
> ids_emp.SetTransObject(SQLCA)
> 
> But the srv.log report:
> Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid Database
> Connection from Jaguar yet no error was returned from the Jaguar Server!

-- 
__________________________

Adam Simmonds [TeamSybase]
System Architect
ITS FLEXSIS PROJECT
The University of Sydney
Phone:  +61 2 9351 5174
Mobile: +61 403 341 474
Fax:    +61 2 9351 7711
0
Adam
7/25/2001 5:10:13 AM
Do you have the cache by name option set on?

"Jack Zhang" <jack.zhang@dingtech.com.cn> wrote in message
news:I18Bw2KFBHA.264@forums.sybase.com...
> My script is:
> SQLCA.DBMS="SYJ"
> SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"
>
> CONNECT USING SQLCA;
>
> If SQLCA.SQLCode<>0 Then
>  ErrorLogging errlog
>  this.GetContextService("ErrorLogging",errlog)
>  errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
>  is_info=SQLCA.SQLErrText
> End If
>
> ids_emp=Create DataStore
> ids_emp.DataObject="d_emp"
> ids_emp.SetTransObject(SQLCA)
>
> But the srv.log report:
> Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid
Database
> Connection from Jaguar yet no error was returned from the Jaguar Server!
>
>
>


0
Daniel
7/25/2001 3:58:34 PM
I have solved it.
Thank you.

"Daniel Coppersmith" <daniel@N.0.S.P.A.M_infrontsoftware.com> wrote in
message news:V6bylYSFBHA.263@forums.sybase.com...
> Do you have the cache by name option set on?
>
> "Jack Zhang" <jack.zhang@dingtech.com.cn> wrote in message
> news:I18Bw2KFBHA.264@forums.sybase.com...
> > My script is:
> > SQLCA.DBMS="SYJ"
> > SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"
> >
> > CONNECT USING SQLCA;
> >
> > If SQLCA.SQLCode<>0 Then
> >  ErrorLogging errlog
> >  this.GetContextService("ErrorLogging",errlog)
> >  errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
> >  is_info=SQLCA.SQLErrText
> > End If
> >
> > ids_emp=Create DataStore
> > ids_emp.DataObject="d_emp"
> > ids_emp.SetTransObject(SQLCA)
> >
> > But the srv.log report:
> > Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid
> Database
> > Connection from Jaguar yet no error was returned from the Jaguar Server!
> >
> >
> >
>
>


0
Jack
7/26/2001 2:45:09 AM
Maybe you could post your solution then others who search through with
similar problems can work it out as well :-)

A.

Jack Zhang wrote:
> 
> I have solved it.
> Thank you.
> 
> "Daniel Coppersmith" <daniel@N.0.S.P.A.M_infrontsoftware.com> wrote in
> message news:V6bylYSFBHA.263@forums.sybase.com...
> > Do you have the cache by name option set on?
> >
> > "Jack Zhang" <jack.zhang@dingtech.com.cn> wrote in message
> > news:I18Bw2KFBHA.264@forums.sybase.com...
> > > My script is:
> > > SQLCA.DBMS="SYJ"
> > > SQLCA.DBPARM="CacheName='Test',UseContextObject='yes'"
> > >
> > > CONNECT USING SQLCA;
> > >
> > > If SQLCA.SQLCode<>0 Then
> > >  ErrorLogging errlog
> > >  this.GetContextService("ErrorLogging",errlog)
> > >  errlog.log("Error Code:"+string(SQLCA.SQLCode)+" ; "+SQLCA.SQLErrText)
> > >  is_info=SQLCA.SQLErrText
> > > End If
> > >
> > > ids_emp=Create DataStore
> > > ids_emp.DataObject="d_emp"
> > > ids_emp.SetTransObject(SQLCA)
> > >
> > > But the srv.log report:
> > > Jul 25 09:30:11 2001: Error Code:-1 ; Error: Failed to get a valid
> > Database
> > > Connection from Jaguar yet no error was returned from the Jaguar Server!
> > >
> > >
> > >
> >
> >

-- 
__________________________

Adam Simmonds [TeamSybase]
System Architect
ITS FLEXSIS PROJECT
The University of Sydney
Phone:  +61 2 9351 5174
Mobile: +61 403 341 474
Fax:    +61 2 9351 7711
0
Adam
7/26/2001 8:27:32 AM
Reply:

Similar Artilces:

Connecting Jaguar object to connection cache from PowerBuilder
I have the following code in PowerBuilder Jaguar User Object Activate event to connect to the transaction object to tea_thin Oracle connection cache which is working successfully. It fails to connect to database and the server log shows connect failed. Any help at the earliest will be highly appreciated. Thanks for your time. -Hitesh -------------------------------------------- ErrorLogging erlinfo_base this.GetContextService("TransactionServer", & txnsrv) this.GetContextService("ErrorLogging", & erlinfo_base) SQLCA.DBMS = "JDS" ...

Powerbuilder components use only 1 connection from connection cache
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...

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...

How to connect a Jaguar connection cache from a C/C++ CORBA component
Hi.. All I am using Jaguar CTS 3.6.1 (#36108) running on MS Windows 2000 Professional. I also installed Sybase Adaptive Server Enterprise PC Client to connect a remote ASE 12.0 database... I have successfully created a connection cache to the database (Connection cache ping OK)... However, i am in trouble making a C/C++ CORBA component to use this conn cache... I added jagCMGetConnection API to get a connection from available cache as following * ------------------------------------------------------*/ retcode = JagCmGetConnection (&cache, (unsigned char *)"us...

Powerbuilder components use only one connection of 50 conn connection cache
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...

REPOST: PB components use only 1 connection from 50 connections connection cache
Hello 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 teste...

Jaguar connection cache Active connection problem
Whenever any method in my custom dw component fails, e.g. setdwobject failed or retrieveex failed, then since generate is not called in PD script, there remains one active database connection. I am connecting to the database in activate event. For each failed method it goes on increasing active connection and gives problem to our DBAs and in turn to us. Can anyone help us how to solve this. After each method fails, we have return statment in PowerDynamo script. Just call generate, or any method that calls setComplete() internally. There is no way around this unless you want to rel...

JDBC Connection Cache gives error when connection
Trying to connect in Powerbuilder NVO using JDBC and the EASDemo database I get the error: java.sql.SQLException: Column not found at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1527) at com.sybase.powerbuilder.jdbc.PbjdbcRowSet.GetColumnBoolean(PbjdbcRowSet.j ava:846) But this just on the connect, I haven't gone near a datawindow yet. Any ideas? TIA, Tim Which DB are you connecting to ? If you are going against ASE or ASA try the jConnect driver... The error that you are getting indicates that the jdbc driver is not compliant to the jdbc s...

I need to connect PowerSite with Connection Cache to Jaguar
I want to connect my HTML/Datawindow to an connection cache in Jaguar with Sybase native driver (libjct.dll), this connection cache pings in the server with no problem. When i making my page in PowerSite and i want to connect the datawindow to an connection cache, just appears ODBC drivers to connect to the database, but i want to know if exists a form to connect the datawindow in PowerSite with connection cache or Native Driver. Thank u Fabr�cio Streppel Francisco Freitas Develop Informatica - Suporte wrote: > I want to connect my HTML/Datawindow to an connectio...

I cannot ping a new Oracle 8 connection cache and sometimes even the connection caches of PB 7 examples.
I've got two computers running WNT Workstation. 1) In the first one, just after installing PB 7.0.2, I cannot ping the connection caches used by the PB 7 examples (for examples: SurfSideVideo 3.5). I've tried to create a new connection cache using Oracle 8 driver (using an Oracle alias as ServerName): Nothing! I can't ping. 2) On the another computer I can ping only the caches of the PB7 examples. But I still cannot create a proper connection cache directly to Oracle 8 (no ODBC). Please help me!!!!!!!! Thank you. Domenico Beato What types of erro...

Jaguar Connection Cache: JagConn: Connection already closed?
Hello all, when choosing in Jaguar Manager the Runtime Monitoring section "Conncetion Cache", I get the following result: testCache Monitoring Value Connections Active -6.0 Connections Opened 4.0 Connections Closed 9.0 Waited Connection Requests 0.0 No Wait Connection Requests 40.0 Forced Conncetion Requests 0.0 Total Conncetion Requests 40.0 Last Maximum Connection Caches Active 0.0 Peak maximum Connection Caches Active 2.0 Can someone please tell me ...

not connected when I am connected
What do I need to change on my 'puter when the icon in the toolbar shows and tells me I am connected and the error message tells me I am not and I can not go to web pages, get or send emails. I have to close down and restart to get connected again. This only happens if I am on line and leave the 'puter for an hour or so. As long as I am using it I don't have a problem. This just started about a month ago. I am on very slow dialup, DSL and Cable not in my area, thanks you SBC/ATT tks Elaine wrote: > What do I need to change on my 'puter when the icon in ...

PowerBuilder components + JDBC connection caches
Hi, We've developed the majority of our components via the PowerBuilder route and have recently experimented with EJBs - an experiment that has proven successful until we try and integrate the two. From my understanding, in order to do this we need to utilise the same JDBC connection cache and we can't get PowerBuilder (7.0.3) to communicate via JDBC to the database. We're using EA Server 3.6.1 with JDK 1.2.2. When we do attempt to initiate a connection from either the PB database painter or within a PB component we end up with the following error: - /*-----------...

How can a Jaguar Component connect to DB
I tried to create a TRANASACITO in a method but SQLCode return always -1 ?? Any help is appreciated THANKS Can you post your code? Jag components need not create their own transaction. You simply connect to the database using a connection cache, and specify the transactional properties of thecomponent in JagManager. Jaguar will take care of the rest. -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://sdn.sybase.com MySybase - http://my.sybase.com Mirko Di Tommaso <mirko.ditommaso@theorematica.it> wrote in message news:6G8Y...

Web resources about - Who can give me a simple example on Jaguar component connect to a connection cache? - sybase.easerver.powerbuilder

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Paris attacks: Belgium connection probed as terrorist past of Brussels district of Molenbeek under spotlight ...
Prosecutors reveal a growing Belgian connection to the deadly Paris attacks, focusing on a poor Brussels district.

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Brussels Connection Under Spotlight After Paris Killings
(EurActiv) — Prosecutors on Sunday disclosed a growing Belgian connection to the Paris attacks as Premier Charles Michel conceded that a Brussels ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Get ready for live-streamed extreme sports: Seattle startup Sioeye adds 4G connection to action cam
The history of people doing crazy stunts on camera is full of notable achievements. Motorcycle daredevil Evel Knievel jumped over whatever he ...

Resources last updated: 11/26/2015 4:00:50 AM