Lookup executes 3 time upon Recordset.Save
- From: "Julian Madle" <julian@xxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 15:39:12 +0100
Getting really strange problem using Recordset.Save: my SQL command gets
executed three times (tested on SQL Server 2000 and 2005 using both sqloledb
and {SQL Server} drivers):
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("Driver={SQL Server}; Server=localhost; Database=DBname; User
ID=Username; Password='password'")
Set RS = objConn.Execute("SET NOCOUNT ON; SELECT ID FROM Products; INSERT
INTO DebugLog (Message) VALUES ('Done'); SET NOCOUNT OFF")
RS.Save "c:\output.xml", 1
Set RS = Nothing
objConn.Close
Set objConn = Nothing
When executed (once) there will be three 'Done' messages in the table named
DebugLog. This does not occur when the (exetremly simplified) SQL is
executed directly inside SQL Server, or when RS.Save is not called. This
looks like a bug in ADO to me.
Can anybody confirm this behaviour and more importantly suggest a
solution/workaround?
Thanks
Julian
.
- Follow-Ups:
- Re: Lookup executes 3 time upon Recordset.Save
- From: Julian Madle
- Re: Lookup executes 3 time upon Recordset.Save
- Prev by Date: Re: Using SQL to create user defined table & column names
- Next by Date: How do I set the DateTimeMode property when filling a DataTable
- Previous by thread: Lookup executes 3 time upon Recordset.Save
- Next by thread: Re: Lookup executes 3 time upon Recordset.Save
- Index(es):
Relevant Pages
- Connect SQL database through ASP
... I have SQL Server 2000 installed on my machine and tried ... to develop asp
script to connect to the server database ... Set objConn = Server.CreateObject ...
Set objRS = Server.CreateObject ... (microsoft.public.sqlserver.connect) - Re: FOR XML AUTO - Cutting off XML
... > I'm using Classic ASP with SQL Server to read in XML data. ... > If
I return about 5 records everything seems fine but returning 10 records,> the XML seems to
cut off towards the end. ... > Set objConn = Server.CreateObject ... > Set
objRS = Server.CreateObject> objRS.Open strSQL, ... (microsoft.public.sqlserver.programming) - Lookup executes 3 time upon Recordset.Save
... executed three times (tested on SQL Server 2000 and 2005 using both sqloledb ...
and drivers): ... Set objConn = Server.CreateObject ... INTO DebugLog
VALUES; ... (microsoft.public.data.ado) - connect to sql server
... I can connect to my database with everything but my ASP page. ... SQL Server
does not exist or access denied" ... the connection string is: ... Set objconn
= Server.CreateObject ... (microsoft.public.sqlserver.programming) - Re: ODBC Drivers
... Sql server is not there and that's the one I need. ... that from an installer
for SQL Server, or from MDAC 2.8 SP1, unless you're ... Note that you can get ODBC drivers
from many sources besides Microsoft. ... those data sources. ... (microsoft.public.data.odbc)