Com+ returns variant array, but 
Author Message
 Com+ returns variant array, but

if I use that code on the exact same .dll locally, vData=obj.method1, I get
error

"91-Object variable or With block variable not set"

Against, the Set obj=CreateObject("Project1.Class1)  ...works

x=obj.property...works

vData=obj.Method1 where Method1=rs.GetRows...works if COM+, but not if .dll
is local.  Property Get statements work local.

Any ideas??



Sun, 07 Aug 2005 07:11:21 GMT  
 Com+ returns variant array, but
Here is the code:

Set oABTInteractions = CreateObject("ABTBusinessServ.clsbsInteraction",
vbNullString & Me.List2.Text)  '****** If List2.Text is empty uses local
.dll
Me.List1.AddItem "Object created " & Text1.Text
On Error GoTo errClose
Dim vData As Variant

vData = oABTInteractions.Get_Interaction_Combo_Data(vbNullString &
Text1.Text, vbNullString & Text2.Text, vbNullString & Text3.Text)  '*****
ERRORS HERE IF USING LOCAL .dll.  WILL NOT ERROR IF VB IDE IS RUNNING THE
.dll PROJECT THOUGH.  WORKS IF SERVER WITH COM+ SPECIFIED (ie.
CreateObject("ABTBusinessServ.clsbsInteraction", "myserver_com_001")

Me.List1.Clear
x = oABTInteractions.SQLServerName  '*******  No problems here with the
Property Get procedure.
Me.List1.AddItem CStr(x)

    If IsArray(vData) Then
        For i = 0 To UBound(vData, 2)
             Me.List1.AddItem CStr(vData(0, i) & " - " & vData(1, i) & " - "
& CStr(vData(2, i)))
        Next i
    End If

Exit Sub

errClose:
MsgBox Err.Number & " - " & Err.Description
Resume Next

Quote:
> if I use that code on the exact same .dll locally, vData=obj.method1, I
get
> error

> "91-Object variable or With block variable not set"

> Against, the Set obj=CreateObject("Project1.Class1)  ...works

> x=obj.property...works

> vData=obj.Method1 where Method1=rs.GetRows...works if COM+, but not if
.dll
> is local.  Property Get statements work local.

> Any ideas??



Sun, 07 Aug 2005 07:35:32 GMT  
 Com+ returns variant array, but
I think you local computer has not setting SQLserver connection just same as
the server.
When you use the COM+, you get the connection where is in server, you it is
sucessed.


Quote:
> Here is the code:

> Set oABTInteractions = CreateObject("ABTBusinessServ.clsbsInteraction",
> vbNullString & Me.List2.Text)  '****** If List2.Text is empty uses local
> .dll
> Me.List1.AddItem "Object created " & Text1.Text
> On Error GoTo errClose
> Dim vData As Variant

> vData = oABTInteractions.Get_Interaction_Combo_Data(vbNullString &
> Text1.Text, vbNullString & Text2.Text, vbNullString & Text3.Text)  '*****
> ERRORS HERE IF USING LOCAL .dll.  WILL NOT ERROR IF VB IDE IS RUNNING THE
> .dll PROJECT THOUGH.  WORKS IF SERVER WITH COM+ SPECIFIED (ie.
> CreateObject("ABTBusinessServ.clsbsInteraction", "myserver_com_001")

> Me.List1.Clear
> x = oABTInteractions.SQLServerName  '*******  No problems here with the
> Property Get procedure.
> Me.List1.AddItem CStr(x)

>     If IsArray(vData) Then
>         For i = 0 To UBound(vData, 2)
>              Me.List1.AddItem CStr(vData(0, i) & " - " & vData(1, i) & " -
"
> & CStr(vData(2, i)))
>         Next i
>     End If

> Exit Sub

> errClose:
> MsgBox Err.Number & " - " & Err.Description
> Resume Next


> > if I use that code on the exact same .dll locally, vData=obj.method1, I
> get
> > error

> > "91-Object variable or With block variable not set"

> > Against, the Set obj=CreateObject("Project1.Class1)  ...works

> > x=obj.property...works

> > vData=obj.Method1 where Method1=rs.GetRows...works if COM+, but not if
> .dll
> > is local.  Property Get statements work local.

> > Any ideas??



Sun, 07 Aug 2005 12:25:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Com+ returns variant array, but

2. returning empty variant array from COM object?

3. Type Mismatch returning variant array from COM object

4. call to COM object returns empty variant array???

5. Passing VARIANT array to COM

6. com variant bstr array

7. Pass Variant Array to a COM Object

8. Passing Variant Array from ASP to COM Component

9. Passing VARIANT array to COM

10. Passing Variant Array from ASP to COM Component

11. Array to Variant and Variant to array problem

12. Returning arrays of VARIANTs to VBScript

 

 
Powered by phpBB® Forum Software