Hello,

I solved a problem we had with some vbscripts accessing MS SQL Server via
ODBC DSN Strings. Transaction sometimes ended in one of the following two
error messages:

Microsoft OLE DB Provider for ODBC Drivers error
[Microsoft][ODBC SQL Server Driver][SQL Server]The COMMIT TRANSACTION
request has no corresponding BEGIN TRANSACTION.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Can not start transaction while in firehose mode.

Until this point we made use of DSN Strings on the vbscript operating
machine which where defined with odbcad32.exe.
In vbscript code we established connection like this:

set database = Server.CreateObject("ADODB.Connection")
connectString = "dsn=" & odbcSource
database.open connectString

Where odbcSource is the string defined with the ODBC Admin Tool.

After we had mentioned errors we changed this. Somewhere in the webdirectory
I placed a new text file and renamed it to something ending with "udl", e.g.
mysource.udl After double clicking this it is opened by the apropiate tool
(Rundll32.exe >--pathto--<oledb32.dll,OpenDSLFile %1) which allows you
configuring connection properties to desired database.

Then the above lines of VB Code are to be changed to this:

set database = Server.CreateObject("ADODB.Connection")
With database
.ConnectionString = "File name=" & Server.mapPath(">--pathto--<") &
"\mysource.udl"
.Open
End With

And what happens? All above errors disappeared and it runs as desired. In
addition, global.asa can access such udl files, too.

--
Marko Faldix
M+R Infosysteme
Hubert-Wienen-Str. 24 52070 Aachen
Tel.: 0241-93878-16 Fax.:0241-875095
E-Mail: marko.faldix@mplusr.de