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.

Problems Running a Stored-Procedure form embedded SQL

2 posts in General Discussion Last posting was on 2003-11-04 19:53:11.0Z
M. Ravari Posted on 2003-11-04 18:16:29.0Z
From: "M. Ravari" <majid@lablogics.com>
Newsgroups: ianywhere.public.general
Subject: Problems Running a Stored-Procedure form embedded SQL
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: adsl-67-127-109-33.dsl.irvnca.pacbell.net
X-Original-NNTP-Posting-Host: adsl-67-127-109-33.dsl.irvnca.pacbell.net
Message-ID: <3fa7ecfd$1@forums-1-dub>
Date: 4 Nov 2003 10:16:29 -0800
X-Trace: forums-1-dub 1067969789 67.127.109.33 (4 Nov 2003 10:16:29 -0800)
X-Original-Trace: 4 Nov 2003 10:16:29 -0800, adsl-67-127-109-33.dsl.irvnca.pacbell.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2015
Article PK: 17382

Hello again, ... with the same problem but more information.

Using ASA 7.0 and dbsrv7...

I have a stored procedure which works just fine while invoked from DBISQL.
Once I call the same SP from my application, however, it does not do any
thing.

After monitoring the data, I found that the breaking point was an INSERT
command at the end of the SP that goes something like this:

INSERT INTO TableA (TableA.Column2, TableA.Column3, TableA.Column4)
SELECT TempTable.Info2, TempTable.Info3, TempTable.Info4
FROM TempTable

Please Note: TableA has a Column1 filed which is an auto-incrementing unique
key.

While running it in DBISQL, Column1 gets the next available number and
everything else gets populated properly.

From the application however, I don't get any errors, yet not only the
TableA does not get inserted, but the peculiar thing is that the information
in the TempTable and in another temporary table which I have created in the
same sp, gets wiped out.

I really hope that someone can help...

Regards,

M. Ravari


Nick Elson Posted on 2003-11-04 19:53:11.0Z
From: "Nick Elson" <no_spam_nicelson@sybase.com>
Newsgroups: ianywhere.public.general
References: <3fa7ecfd$1@forums-1-dub>
Subject: Re: Problems Running a Stored-Procedure form embedded SQL
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: nicelson-xp.sybase.com
X-Original-NNTP-Posting-Host: nicelson-xp.sybase.com
Message-ID: <3fa803a7$1@forums-1-dub>
Date: 4 Nov 2003 11:53:11 -0800
X-Trace: forums-1-dub 1067975591 172.31.140.58 (4 Nov 2003 11:53:11 -0800)
X-Original-Trace: 4 Nov 2003 11:53:11 -0800, nicelson-xp.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2018
Article PK: 17343

Sounds like the application must not be committing or must be issuing
a ROLLBACK statement.

Does -zr sql show you anything useful?

"M. Ravari" <majid@lablogics.com> wrote in message
news:3fa7ecfd$1@forums-1-dub...
> Hello again, ... with the same problem but more information.
>
> Using ASA 7.0 and dbsrv7...
>
> I have a stored procedure which works just fine while invoked from DBISQL.
> Once I call the same SP from my application, however, it does not do any
> thing.
>
> After monitoring the data, I found that the breaking point was an INSERT
> command at the end of the SP that goes something like this:
>
> INSERT INTO TableA (TableA.Column2, TableA.Column3, TableA.Column4)
> SELECT TempTable.Info2, TempTable.Info3, TempTable.Info4
> FROM TempTable
>
> Please Note: TableA has a Column1 filed which is an auto-incrementing
unique
> key.
>
> While running it in DBISQL, Column1 gets the next available number and
> everything else gets populated properly.
>
> From the application however, I don't get any errors, yet not only the
> TableA does not get inserted, but the peculiar thing is that the
information
> in the TempTable and in another temporary table which I have created in
the
> same sp, gets wiped out.
>
> I really hope that someone can help...
>
> Regards,
>
> M. Ravari
>
>