Hi All,

I have a VB6 app to do some data checking on a SQL2000 server. Usually
there are few hundres to few thousand records awaiting.

The app will firstly create a recordset for data with a "U" - uncheck flag
on a varchar field, then it will process the validation, if the record
failed then it will update the field with "F" otherwise "P" for passed. It
will also insert a record into a history table to specified why the record
failed.

The probelm I have is that the app very offer get time out error while it's
updating the field from "U" to other status. I'm wondering is there any
workaround I can solve this problem? And is VB's ADO recordset capable to
hold few thousand of records (with about 120 fields)?

Please advice, if you need more information please feel free to ask me,
thanks!!

K.K.

Re: Time out problem by Jan

Jan
Fri Apr 30 03:23:47 CDT 2004

"K.K." <someone@microsoft.com>'s wild thoughts were released
on Fri, 30 Apr 2004 16:04:25 +1000 bearing the following
fruit:

>Hi All,
>
>I have a VB6 app to do some data checking on a SQL2000 server. Usually
>there are few hundres to few thousand records awaiting.
>
>The app will firstly create a recordset for data with a "U" - uncheck flag
>on a varchar field, then it will process the validation, if the record
>failed then it will update the field with "F" otherwise "P" for passed. It
>will also insert a record into a history table to specified why the record
>failed.
>
>The probelm I have is that the app very offer get time out error while it's
>updating the field from "U" to other status. I'm wondering is there any
>workaround I can solve this problem? And is VB's ADO recordset capable to
>hold few thousand of records (with about 120 fields)?
>
>Please advice, if you need more information please feel free to ask me,
>thanks!!
>

This is probably because that record is locked. Unless you
tell SQLServer otherwise, it won't return an error, it will
sit and wait for the record to become free.

If your certain that no other process is locking that record
then check that anything you are doing is not being
esculated from a row level lock to a page or table level
lock.

I'm sure someone wil correct me if I'm wrong but IIRC you
could issue the SET LOCK_TIMEOUT 0 command on the connection
your using, this would cause it to generate an error if a
record is locked, at least you could continue processing the
other records (providing the table hasn't become locked)



--
Jan Hyde (MVP - Visual Basic)

"I'll have to change your grade" Tom's teacher remarked
(Kegel Archives)

[Abolish the TV Licence - http://www.tvlicensing.biz/]


Re: Time out problem by Bonj

Bonj
Fri Apr 30 16:32:44 CDT 2004

There is a timeout property of an ADO connection object, set it to zero to
wait inefinitely, but you should be considering if the record is locked,
causing a deadlock maybe.
But this whole operation could be done via pure SQL - best bet would be to
create a stored procedure. This would certainly be faster. What is the
logic, and I'll tell you how to write the SQL to do it.

"K.K." <someone@microsoft.com> wrote in message
news:uJPZAhnLEHA.3472@TK2MSFTNGP09.phx.gbl...
> Hi All,
>
> I have a VB6 app to do some data checking on a SQL2000 server. Usually
> there are few hundres to few thousand records awaiting.
>
> The app will firstly create a recordset for data with a "U" - uncheck flag
> on a varchar field, then it will process the validation, if the record
> failed then it will update the field with "F" otherwise "P" for passed.
It
> will also insert a record into a history table to specified why the record
> failed.
>
> The probelm I have is that the app very offer get time out error while
it's
> updating the field from "U" to other status. I'm wondering is there any
> workaround I can solve this problem? And is VB's ADO recordset capable to
> hold few thousand of records (with about 120 fields)?
>
> Please advice, if you need more information please feel free to ask me,
> thanks!!
>
> K.K.
>
>
>