Groups | Blog | Home
all groups > sql server odbc > march 2004 >

sql server odbc : Can't connect ODBC/SQLSrvr linked table from within COM+ component


Raf
3/5/2004 4:41:07 AM
I have an Access 2000 database containing an ODBC table linked to a SQL Server 2000 database (using a system DSN)
No problem opening the table Using Access 2000 itself
No problem even within a VB program (EXE) accessing that table using the following code

Set rs = New ADODB.Recordse
With r
.ActiveConnection = cnSr
.Source = "SELECT * FROM "
& "[ODBC;" & tbODBC.Properties("Jet OLEDB:Link Provider String") & "]."
& tbODBC.Name & vbCrLf & "WHERE FALSE
.CursorLocation = adUseServe
End Wit
On Error Resume Nex
rs.Open ' <--- ERROR RAISES HER

cnSrc is an ADO Connection with Access2000 DB
tbODBC is an ADOX Table object corresponding to the linked ODBC tabl

But if the same code is placed in a COM+ component (DLL ActiveX), once invoked by any client, when the final "rs.Open" is executed, the following error raises:
"Connection to <sql server database name> failed
Number = 0x8000400
SQLState = 315

I've searched many places but with no results
Some help will be appreciated

Thanks in advanc

Ra
Gert E.R. Drapers
3/29/2004 9:36:00 AM
The Jet OLEDB provider does not support distributed transactions since it
does not implement the ITransactionJoin OLE-DB interface.

GertD@SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2004 All rights reserved.

[quoted text, click to view]

AddThis Social Bookmark Button