|
-
Jun 14th, 2002, 08:52 AM
#1
GetObjectContext()
Dim ctxobject As ObjectContext
Dim objAccount As Account.Pay
Set ctxobject = GetObjectContext()
Set objAccount = ctxobject.CreateInstance("Account.Pay")
I'm trying to run the code above cause I want to be able to use the SetComplete and SetAbort. But it always give me the runtime error 91 : Object variable or With block variable not set.
I noticed that the - Set ctxobject = GetObjectContext()
doesn't seem to work cause it give my object variable Nothing. What's wrong with it?
-
Jun 18th, 2002, 10:52 PM
#2
Same problem
I'm using COM+ and previously it worked like a charm, but now it doesn't for another project I'm playing with.
The setup as far as my server and client is the same, it just doesn't seem to be able to create the context object.
I'm running terminal services in the client since last time I did this but I'm not sure that it matters. Most likely it wouldn't.
Anybody here who can help? Thanks in advance.
-
Jun 18th, 2002, 11:00 PM
#3
At work, we usually do something like this :
VB Code:
Dim ctxobject As ObjectContext
Dim objAccount As Account.Pay
Set ctxobject = GetObjectContext()
If Not ctxoject Is Nothing Then
Set objAccount = ctxobject.CreateInstance("Account.Pay")
Else
Set objAccount = CreateObject("Account.Pay")
End If
And it works. Just don't ask me to explain it. 
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jun 19th, 2002, 08:39 AM
#4
OK,
So what if I'm just a plain .exe client creating an instance of a COM+ component?
I will only have
Dim ctxobject As ObjectContext
Set ctxobject = GetObjectContext()
in the component and the client will create an instance of it just like a non-COM+ component correct?
Any ideas on why an objectcontext of Nothing is still there?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|