I have a question about the executing of an SQL clause in xp(extended stored procedure).
I saw the examples about the ODS: xp_gettable_dblib and xp_gettable_odbc.
When I call xp_gettable_dblib, this xp execute the SQL clause in session, which is different from the session from which it is called(EXEC xp_gettable_dblib. Of course this is because of the dbopen).
I also saw the extended stored procedure xp_execresultset(xp_repl.dll) , which also can execute an SQL clause, but in contrast to xp_gettable_dblib, this SQL clause is executed in the same session, from which it is called.
I am interested how it is made?
I saw that in xp_repl.dll are imported 5 API procedures from ODBC32.dll. In this case is ODBC API is used?
I want to write my own xp, using the technology used in xp_execresultset.