Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Mon, 7 Jan 2008 22:09:51 -0500
P.Nishanthan wrote:
Hi Can anybody help on this.
We have a asp file that should delete all the records in a table for
an operation.
See the code below.
Dim Rs
Dim sql
Set Rs = CreateObject("ADODB.Recordset")
sql= "SELECT * FROM Table1;"
Rs.Open sql, connUsers,2,3
do while not Rs.eof
Rs.delete
Rs.movenext
loop
Rs.Close
Set Rs = Nothing
But this fails randomly with the following message:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionWrite
(WrapperWriteOOB()).
/stools/woms/importtotbl.asp, line 63
line 63 is : Rs.delete
I tried 'connUsers.execute "DELETE FROM Table1"' also. It also fails
with same message. Please help.
1. Stop using ODBC. Please tell us the type and version of the database you
are using whenever asking a database-related question. Based on the error
message, I see you are using SQL Server, but the correct connection string
depends on the version of sql server you are using. See
www.connectionstrings.com and pick the relevant OLE DB connection string (it
will have either SQLOLEDB or SQLNACL depending on the version)
2. I am shocked that 'connUsers.execute "DELETE FROM Table1"' was your
second choice. Never use a recordset to do what can be done via a single set
operation. I can offer an improvement:
connUsers.execute "TRUNCATE TABLE Table1",,129
--
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"
.
- Follow-Ups:
- Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- From: Stephen Howe
- Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- From: P.Nishanthan
- Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- References:
- ConnectionWrite WrapperWriteOOB Error - Urgent
- From: P.Nishanthan
- ConnectionWrite WrapperWriteOOB Error - Urgent
- Prev by Date: ConnectionWrite WrapperWriteOOB Error - Urgent
- Next by Date: Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- Previous by thread: ConnectionWrite WrapperWriteOOB Error - Urgent
- Next by thread: Re: ConnectionWrite WrapperWriteOOB Error - Urgent
- Index(es):
Relevant Pages
|
|