Hi,
this may not be the correct forum for postings regarding COM+ etc.

Firstly, I have recently moved to win2k and have found that some transactional related code I have doesn't appear to work. The objectcontext() object in my code doesn't appear to get set, i.e. after

Set co_COM = GetObjectContext()

the object is still set to nothing.

I discovered the following at MS.

http://support.microsoft.com/support.../Q188/9/19.ASP

but this did not prevent this issue.
I have referenced COM+ services type library and COM+ 1.0 Admin Library. I should also say I haven't tried this ( yet ) on NT 4.0.

Source code below.

Any help appreciated:


Public Function getCustomerRecords() As ADODB.Recordset
Dim ls_SQL As String
Dim lrs_Customers As ADODB.Recordset
Dim lcomm_customers As New ADODB.Command
Dim ss As String


On Error GoTo ConnectError
Set co_COM = GetObjectContext()

Set lrs_Customers = New ADODB.Recordset
lrs_Customers.Source = ls_SQL

ls_SQL = "select * from repl_test"

lcomm_customers.CommandText = ls_SQL
lcomm_customers.CommandType = adCmdText
lcomm_customers.ActiveConnection = Connection_String

lrs_Customers.CursorType = adOpenStatic
Set lrs_Customers.Source = lcomm_customers
lrs_Customers.Open


' Return the records
Set getCustomerRecords = lrs_Customers

co_COM.SetComplete
Set co_COM = Nothing
Exit Function

ConnectError:
MsgBox Err.Number & " " & Err.Description
co_COM.SetAbort
Set co_COM = Nothing
End Function