Lookback connection inside an Extended Proc using ADO

From: Tom Olson (tomo_at_tomo.com)
Date: 10/23/04


Date: Sat, 23 Oct 2004 05:34:22 -0500

I am trying to do a loopback connection to Sql Server from inside an
Extended Stored Procedure that uses the TAdo... components to make the
connection. When the data set is retrieved the SQL looks like this:

exec master.dbo.sp_bindsession %s

select *
from [test_table]
where [id] = 1

Note '%s' is replaced by the actual bind token received from the client. I
have also tried the srv_getbindtoken method and both yield the same result.

Unfortunately if a bound session is requested any changes made to the
dataset, inside the call to the extended proc are saved even if a rollback
is executed after the call to the extended proc.

Has anyone had any luck with this?

Thanks,

Tom



Relevant Pages

  • Re: Querying File Size in SQL Server
    ... How would I get a handle on the collection object ... in SQL Server since SQL Server doesn't support Arrays. ... DLL in VB for it to be used as an Extended Proc in SQL ... >> ' VBScript source code BEGINS ...
    (microsoft.public.sqlserver.programming)
  • Re: Extended SP ?
    ... You cannot do this in SQL Server 2000. ... procedures in amanged code and even triggers can be written in .NET ... "Ashkan Daie" wrote in message ... That is why I am pursuing the extended proc method. ...
    (microsoft.public.sqlserver.programming)
  • Extended Stored Procedure - ODBC Loopback Connection Problem
    ... I have a loopback connection using ODBC in the DLL initialization code of ... the SQL Server ESP Module. ... The loopback connection works ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction Abort in a trigger SQL 2008, writing to event log
    ... Well, it would be nice to access the call stack from anywhere in SQL Server, ... procedure finds that there is an open transaction, ... that performs a loopback connection and writes to this table outside the ...
    (microsoft.public.sqlserver.programming)