Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Error Accessing Datastore

5 posts in General Discussion (old) Last posting was on 2000-03-10 14:33:30.0Z
Suresh Subrmaniam Posted on 2000-03-09 20:03:00.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 09 Mar 2000 15:03:00 -0500
From: Suresh Subrmaniam <ssubramaniam@psc.gov>
X-Mailer: Mozilla 4.08 [en] (WinNT; I)
MIME-Version: 1.0
Subject: Error Accessing Datastore
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 29
NNTP-Posting-Host: 158.72.55.43
Message-ID: <347_38C80374.964F57A1@psc.gov>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26755
Article PK: 157736

I have a Non visual object in Pb 7.0. Creation of jag component and
connection to database in the NV object does not produce errors. I am
also
passing a param namely user name to the NVO and it is passed correctly.
However while retrieve the datawindow object it always retrieves no row.

The SetTransObject function in uf_validate_login returns -1.

Here is code in NVO n_validate_login:
----------------
Activate Event:
-----------------
SQLCA.DBMS="O73 ORACLE v7.3"
SQLCA.DBParm =
"DelimitIdentifier='No',CacheName='cos_jag_cache_to_alpha',DisableBind=1"

CONNECT using SQLCA;
If SQLCA.SQLCode <> 0 Then return -1
----------------
DeActivate Event:
-----------------

Disconnect using SQLCA;
-------------------------
function:uf_validate_login
--------------------------
datastore ds_datastore
Integer ll_rowcount

ds_datastore = Create Datastore
ds_datastore.DataObject = 'd_valid_user_id'
ds_datastore.SetTransObject(SQLCA)
If ds_datastore.Retrieve(as_username) <= 0 Then
return -1
else
return ds_datastore.object.person_id[1]

End If


Mark Lanz Posted on 2000-03-09 21:00:57.0Z
Newsgroups: sybase.public.easerver
From: "Mark Lanz" <mark.lanz@digifuse.nospam.com>
Subject: Re: Error Accessing Datastore
Date: Thu, 9 Mar 2000 16:00:57 -0500
Lines: 59
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: innovativeit.com 199.3.215.1
Message-ID: <347_HcbCFtgi$GA.74@forums.sybase.com>
References: <347_38C80374.964F57A1@psc.gov>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26748
Article PK: 157728

When you deployed from the project in PB did you check "Include Unreferenced
Objects in Consolidated PBD" on the Libraries tab of the properties?
Failure to do so would cause this problem.

Also, there is no way to tell if your Connect succeeded or not. If the
Connect failed, so will your SetTransObject(). You should write out some
error messages to the Jaguar log to help you debug. Or use the remote
debugger to step through your code and examine the SQLCA object.

HTH.

Mark Lanz
digital fusion, inc.

Suresh Subrmaniam <ssubramaniam@psc.gov> wrote in message
news:38C80374.964F57A1@psc.gov...
> I have a Non visual object in Pb 7.0. Creation of jag component and
> connection to database in the NV object does not produce errors. I am
> also
> passing a param namely user name to the NVO and it is passed correctly.
> However while retrieve the datawindow object it always retrieves no row.
>
> The SetTransObject function in uf_validate_login returns -1.
>
> Here is code in NVO n_validate_login:
> ----------------
> Activate Event:
> -----------------
> SQLCA.DBMS="O73 ORACLE v7.3"
> SQLCA.DBParm =
> "DelimitIdentifier='No',CacheName='cos_jag_cache_to_alpha',DisableBind=1"
>
> CONNECT using SQLCA;
> If SQLCA.SQLCode <> 0 Then return -1
> ----------------
> DeActivate Event:
> -----------------
>
> Disconnect using SQLCA;
> -------------------------
> function:uf_validate_login
> --------------------------
> datastore ds_datastore
> Integer ll_rowcount
>
> ds_datastore = Create Datastore
> ds_datastore.DataObject = 'd_valid_user_id'
> ds_datastore.SetTransObject(SQLCA)
> If ds_datastore.Retrieve(as_username) <= 0 Then
> return -1
> else
> return ds_datastore.object.person_id[1]
>
> End If
>
>
>


Suresh Subrmaniam Posted on 2000-03-10 13:46:07.0Z
Newsgroups: sybase.public.easerver
Date: Fri, 10 Mar 2000 08:46:07 -0500
From: Suresh Subrmaniam <ssubramaniam@psc.gov>
X-Mailer: Mozilla 4.08 [en] (WinNT; I)
MIME-Version: 1.0
To: Mark Lanz <mark.lanz@digifuse.nospam.com>
Subject: Re: Error Accessing Datastore
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 75
NNTP-Posting-Host: 158.72.55.43
Message-ID: <347_38C8FC9F.DBC6AC5B@psc.gov>
References: <347_38C80374.964F57A1@psc.gov> <347_HcbCFtgi$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26699
Article PK: 154423

Hi,

Thanks for your info. I checked my project it was ok. I regenerated and
build the project with Include Unreference objects checked. It does not seem to
work
IT used to work a day ago. The HTML datawindow seems to be working with all dddw
shown.
It is only this NVO that is creating some problem.

Any helpis appreciated

Thanks

Suresh
Digital Fusion
-----------------------

Here is the portion of my page where i call the method.

<!--script
// Create the Jaguar Component n_validate_login

var complogin =
java.CreateComponent("pkg_validate_login/n_validate_login","iiop://localhost:9000","jagadmin","");

if (complogin == null) {
found = false;
psDocument.WriteLn("Error Creating Validate Component");
psDocument.WriteLn("Error Message: "+ site.GetErrorInfo());
} else {
retval = complogin.uf_validate_login(user);
psDocument.WriteLn("Return Value:: "+retval);
if (retval > 0 ) {
found = true;
}
}
--->

Mark Lanz wrote:

> When you deployed from the project in PB did you check "Include Unreferenced
> Objects in Consolidated PBD" on the Libraries tab of the properties?
> Failure to do so would cause this problem.
>
> Also, there is no way to tell if your Connect succeeded or not. If the
> Connect failed, so will your SetTransObject(). You should write out some
> error messages to the Jaguar log to help you debug. Or use the remote
> debugger to step through your code and examine the SQLCA object.
>
> HTH.
>
> Mark Lanz
> digital fusion, inc.
>
> Suresh Subrmaniam <ssubramaniam@psc.gov> wrote in message
> news:38C80374.964F57A1@psc.gov...
> > I have a Non visual object in Pb 7.0. Creation of jag component and
> > connection to database in the NV object does not produce errors. I am
> > also
> > passing a param namely user name to the NVO and it is passed correctly.
> > However while retrieve the datawindow object it always retrieves no row.
> >
> > The SetTransObject function in uf_validate_login returns -1.
> >
> > Here is code in NVO n_validate_login:
> > ----------------
> > Activate Event:
> > -----------------
> > SQLCA.DBMS="O73 ORACLE v7.3"
> > SQLCA.DBParm =
> > "DelimitIdentifier='No',CacheName='cos_jag_cache_to_alpha',DisableBind=1"
> >
> > CONNECT using SQLCA;
> > If SQLCA.SQLCode <> 0 Then return -1
> > ----------------
> > DeActivate Event:
> > -----------------
> >
> > Disconnect using SQLCA;
> > -------------------------
> > function:uf_validate_login
> > --------------------------
> > datastore ds_datastore
> > Integer ll_rowcount
> >
> > ds_datastore = Create Datastore
> > ds_datastore.DataObject = 'd_valid_user_id'
> > ds_datastore.SetTransObject(SQLCA)
> > If ds_datastore.Retrieve(as_username) <= 0 Then
> > return -1
> > else
> > return ds_datastore.object.person_id[1]
> >
> > End If
> >
> >
> >


Suresh Subrmaniam Posted on 2000-03-10 13:46:55.0Z
Newsgroups: sybase.public.easerver
Date: Fri, 10 Mar 2000 08:46:55 -0500
From: Suresh Subrmaniam <ssubramaniam@psc.gov>
X-Mailer: Mozilla 4.08 [en] (WinNT; I)
MIME-Version: 1.0
Subject: Re: Error Accessing Datastore
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 75
NNTP-Posting-Host: 158.72.55.43
Message-ID: <347_38C8FCCF.356D3468@psc.gov>
References: <347_38C80374.964F57A1@psc.gov> <347_HcbCFtgi$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26698
Article PK: 154424

Hi,

Thanks for your info. I checked my project it was ok. I regenerated and
build the project with Include Unreference objects checked. It does not seem to
work
IT used to work a day ago. The HTML datawindow seems to be working with all dddw
shown.
It is only this NVO that is creating some problem.

Any helpis appreciated

Thanks

Suresh
Digital Fusion
-----------------------

Here is the portion of my page where i call the method.

<!--script
// Create the Jaguar Component n_validate_login

var complogin =
java.CreateComponent("pkg_validate_login/n_validate_login","iiop://localhost:9000","jagadmin","");

if (complogin == null) {
found = false;
psDocument.WriteLn("Error Creating Validate Component");
psDocument.WriteLn("Error Message: "+ site.GetErrorInfo());
} else {
retval = complogin.uf_validate_login(user);
psDocument.WriteLn("Return Value:: "+retval);
if (retval > 0 ) {
found = true;
}
}
--->

Mark Lanz wrote:

> When you deployed from the project in PB did you check "Include Unreferenced
> Objects in Consolidated PBD" on the Libraries tab of the properties?
> Failure to do so would cause this problem.
>
> Also, there is no way to tell if your Connect succeeded or not. If the
> Connect failed, so will your SetTransObject(). You should write out some
> error messages to the Jaguar log to help you debug. Or use the remote
> debugger to step through your code and examine the SQLCA object.
>
> HTH.
>
> Mark Lanz
> digital fusion, inc.
>
> Suresh Subrmaniam <ssubramaniam@psc.gov> wrote in message
> news:38C80374.964F57A1@psc.gov...
> > I have a Non visual object in Pb 7.0. Creation of jag component and
> > connection to database in the NV object does not produce errors. I am
> > also
> > passing a param namely user name to the NVO and it is passed correctly.
> > However while retrieve the datawindow object it always retrieves no row.
> >
> > The SetTransObject function in uf_validate_login returns -1.
> >
> > Here is code in NVO n_validate_login:
> > ----------------
> > Activate Event:
> > -----------------
> > SQLCA.DBMS="O73 ORACLE v7.3"
> > SQLCA.DBParm =
> > "DelimitIdentifier='No',CacheName='cos_jag_cache_to_alpha',DisableBind=1"
> >
> > CONNECT using SQLCA;
> > If SQLCA.SQLCode <> 0 Then return -1
> > ----------------
> > DeActivate Event:
> > -----------------
> >
> > Disconnect using SQLCA;
> > -------------------------
> > function:uf_validate_login
> > --------------------------
> > datastore ds_datastore
> > Integer ll_rowcount
> >
> > ds_datastore = Create Datastore
> > ds_datastore.DataObject = 'd_valid_user_id'
> > ds_datastore.SetTransObject(SQLCA)
> > If ds_datastore.Retrieve(as_username) <= 0 Then
> > return -1
> > else
> > return ds_datastore.object.person_id[1]
> >
> > End If
> >
> >
> >


Mark Lanz Posted on 2000-03-10 14:33:30.0Z
Newsgroups: sybase.public.easerver
From: "Mark Lanz" <mark.lanz@digifuse.nospam.com>
Subject: Re: Error Accessing Datastore
Date: Fri, 10 Mar 2000 09:33:30 -0500
Lines: 135
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: innovativeit.com 199.3.215.1
Message-ID: <347_ixYVN5pi$GA.111@forums.sybase.com>
References: <347_38C80374.964F57A1@psc.gov> <347_HcbCFtgi$GA.74@forums.sybase.com> <347_38C8FCCF.356D3468@psc.gov>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26689
Article PK: 157683

Suresh,
In your Activate Event replace "If SQLCA.SQLCode <> 0 Then return -1" with:

GetContextService("ErrorLogging", iel_jag)

IF SQLCA.SQLCode <> 0 THEN
iel_jag.log(ClassName()+ " Unable to get a connection.~r~n" + &
"SQLCODE: " + String(atrs_data.sqlcode) + "~r~n" + &
"SQLDBCODE: " + String(atrs_data.sqldbcode) + "~r~n" + &
"SQLERRTEXT: " + atrs_data.sqlerrtext)
ELSE
iel_jag.log("Connection Succeeded")
END IF

Where you have an instance variable:
ErrorLogging iel_jag

Check %JAGUAR%\bin\srv.log for the results. This way, you can know for sure
that your connection succeeded.

HTH,
Mark

Suresh Subrmaniam <ssubramaniam@psc.gov> wrote in message
news:38C8FCCF.356D3468@psc.gov...
> Hi,
>
> Thanks for your info. I checked my project it was ok. I regenerated and
> build the project with Include Unreference objects checked. It does not
seem to
> work
> IT used to work a day ago. The HTML datawindow seems to be working with
all dddw
> shown.
> It is only this NVO that is creating some problem.
>
> Any helpis appreciated
>
> Thanks
>
> Suresh
> Digital Fusion
> -----------------------
>
> Here is the portion of my page where i call the method.
>
> <!--script
> // Create the Jaguar Component n_validate_login
>
> var complogin =
>

java.CreateComponent("pkg_validate_login/n_validate_login","iiop://localhost
:9000","jagadmin","");
>
> if (complogin == null) {
> found = false;
> psDocument.WriteLn("Error Creating Validate Component");
> psDocument.WriteLn("Error Message: "+ site.GetErrorInfo());
> } else {
> retval = complogin.uf_validate_login(user);
> psDocument.WriteLn("Return Value:: "+retval);
> if (retval > 0 ) {
> found = true;
> }
> }
> --->
>
>
> Mark Lanz wrote:
>
> > When you deployed from the project in PB did you check "Include
Unreferenced
> > Objects in Consolidated PBD" on the Libraries tab of the properties?
> > Failure to do so would cause this problem.
> >
> > Also, there is no way to tell if your Connect succeeded or not. If the
> > Connect failed, so will your SetTransObject(). You should write out
some
> > error messages to the Jaguar log to help you debug. Or use the remote
> > debugger to step through your code and examine the SQLCA object.
> >
> > HTH.
> >
> > Mark Lanz
> > digital fusion, inc.
> >
> > Suresh Subrmaniam <ssubramaniam@psc.gov> wrote in message
> > news:38C80374.964F57A1@psc.gov...
> > > I have a Non visual object in Pb 7.0. Creation of jag component and
> > > connection to database in the NV object does not produce errors. I am
> > > also
> > > passing a param namely user name to the NVO and it is passed
correctly.
> > > However while retrieve the datawindow object it always retrieves no
row.
> > >
> > > The SetTransObject function in uf_validate_login returns -1.
> > >
> > > Here is code in NVO n_validate_login:
> > > ----------------
> > > Activate Event:
> > > -----------------
> > > SQLCA.DBMS="O73 ORACLE v7.3"
> > > SQLCA.DBParm =
> > >
"DelimitIdentifier='No',CacheName='cos_jag_cache_to_alpha',DisableBind=1"
> > >
> > > CONNECT using SQLCA;
> > > If SQLCA.SQLCode <> 0 Then return -1
> > > ----------------
> > > DeActivate Event:
> > > -----------------
> > >
> > > Disconnect using SQLCA;
> > > -------------------------
> > > function:uf_validate_login
> > > --------------------------
> > > datastore ds_datastore
> > > Integer ll_rowcount
> > >
> > > ds_datastore = Create Datastore
> > > ds_datastore.DataObject = 'd_valid_user_id'
> > > ds_datastore.SetTransObject(SQLCA)
> > > If ds_datastore.Retrieve(as_username) <= 0 Then
> > > return -1
> > > else
> > > return ds_datastore.object.person_id[1]
> > >
> > > End If
> > >
> > >
> > >
>