Delay

Delay

am 23.07.2005 21:21:26 von Roland Hall

After posting a record to SQL Server, is there ever an issue trying to get
the last record posted and it not being there due to an extensive process
during the post? What is the best way to handle this, in ASP or SQL?

TIA...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

RE: Delay

am 25.07.2005 04:37:44 von lukezhan

Hello Roland,

It is better to use same connection to read and write the record so that it
can know the changes in database right way. Also, we should use the
adOpenDynamic and Server side cursor to get "fresh" data in the database.

Luke

Re: Delay

am 25.07.2005 10:23:51 von Roland Hall

"[MSFT]" wrote in message news:dhC$fHMkFHA.2700@TK2MSFTNGXA01.phx.gbl...
: It is better to use same connection to read and write the record so that
it
: can know the changes in database right way. Also, we should use the
: adOpenDynamic and Server side cursor to get "fresh" data in the database.

Hi Luke...

Thanks for responding.

Are you telling me as long as I use adOpenDynamic this is not an issue? I
have heard that SQL will return control to ASP when it feels everything is
correct but may not be finished processing the data. If I think choose to
try to get the last record, it may not be available. Are you debunking
that?

Please elaborate on the server-side cursor.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Re: Delay

am 26.07.2005 05:03:21 von lukezhan

Hello Roland,

If the back database is Access, it may be possible for the delay due to the
file read cache, but for SQL server it isn't possible for that.

With Server side and Dynamic cursor, we even can know the new record added
by other connections. Here is an article about ADO cursors:

http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/adosql/adop
rg02_1svj.asp

Luke

Re: Delay

am 30.07.2005 20:06:55 von reb01501

Roland Hall wrote:
> After posting a record to SQL Server, is there ever an issue trying
> to get the last record posted and it not being there due to an
> extensive process during the post? What is the best way to handle
> this, in ASP or SQL?
>
Assuming that by "posting", you mean "inserting", then no, the should be no
issue Executing a stored procedure or insert statement from ASP will be
synchronous, so your code will not get control back until ADO receives the
result (one way or the other) from your database.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"