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.

Timing Gaps

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-07-30 21:13:13.0Z
Warren Master Posted on 1997-07-10 21:13:53.0Z
Message-ID: <33C55091.76FF@nac.net>
Date: Thu, 10 Jul 1997 17:13:53 -0400
From: Warren Master <wsm@nac.net>
Reply-To: wsm@nac.net
Organization: MCS
X-Mailer: Mozilla 3.0 (Win95; I)
MIME-Version: 1.0
Subject: Timing Gaps
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 32
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:559
Article PK: 252310

I seem to be experiencing a problem using jConnect

I have 9 Threads of Which each have there own Connection to the Database
They are all constantly executing a stored procedure which updates a row
in a table that contains two strings and two doubles. and calls another
stored procedure which does some selects of the data and then makes two
calls to a openServer application for Calculations.


I am noticing the following (In any given thread).

After I have executed the stored proc (anywhere from 0-30 calls to the
s.p) I am doing a select for all the rows I could have updated and then
compare the results to see if what is in my cache is now in the database
(BTW I am only doing this to find my problem)

I do not always see the updated data right away. It seems there is a
delay from when the new data is updated and available for select.

Can I assume that after executeUpdate() on a Prepared Call returns
the Updated data will be available immediately ?


On other occasions The data is not updated at all! and I notices that
when this happens once of my double values is updated and the other is
0.


any ideas are appreciated.

thank You

Warren Master
Global Emerging Markets
Chase Manhattan Bank


David Clegg Posted on 1997-07-30 21:13:13.0Z
Message-ID: <33DFAE69.633C65A4@sybase.com>
Date: Wed, 30 Jul 1997 14:13:13 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 3.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: wsm@nac.net
Subject: Re: Timing Gaps
References: <33C55091.76FF@nac.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 51
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:437
Article PK: 252189


Warren Master wrote:
>
> I seem to be experiencing a problem using jConnect
>
> I have 9 Threads of Which each have there own Connection to the Database
> They are all constantly executing a stored procedure which updates a row
> in a table that contains two strings and two doubles. and calls another
> stored procedure which does some selects of the data and then makes two
> calls to a openServer application for Calculations.
>
> I am noticing the following (In any given thread).
>
> After I have executed the stored proc (anywhere from 0-30 calls to the
> s.p) I am doing a select for all the rows I could have updated and then
> compare the results to see if what is in my cache is now in the database
> (BTW I am only doing this to find my problem)
>
> I do not always see the updated data right away. It seems there is a
> delay from when the new data is updated and available for select.
>
> Can I assume that after executeUpdate() on a Prepared Call returns
> the Updated data will be available immediately ?
>
> On other occasions The data is not updated at all! and I notices that
> when this happens once of my double values is updated and the other is
> 0.

A couple obvious possibilities: What transaction mode are your
connections in? If they are in autocommit mode (the default if you've
got the jConnect MetaData support installed on your server), then
the data should be visible to all connections by the time executeUpdate
returns -- but if you are in chained transaction mode the changes
won't be visible until you commit them.

If you execute multiple statements on the same connection without
processing ALL results or cancelling the results on one statement
before executing the next, then you may have cached results on the
earlier statement. As you process those results, they may be showing
you the state of the database at the time the statement was executed,
not what the database is like at the time you are processing the
results.