|
-
Sep 20th, 2002, 12:04 PM
#1
Thread Starter
Lively Member
Op not allowed when obj is closed? - RESOLVED
I get the following error when attempting to assign a recordset as the Data source for a DataReport in VB6...
"Operation not allowed when object is closed."
I have not explicitly closed the newly created rst.
I am using:
cursorlocation of adUseClient
cursortype of adLockReadOnly
cursorlocktype of adLockOptimistic
What else can i check? The very next step after creating the rst I check the recordcount and that is when I am getting the error.
HELP!
Last edited by mdsoren; Sep 20th, 2002 at 12:42 PM.
-
Sep 20th, 2002, 12:09 PM
#2
Need-a-life Member
Re: Op not allowed when obj is closed?
Originally posted by mdsoren
I get the following error when attempting to assign a recordset as the Data source for a DataReport in VB6...
"Operation not allowed when object is closed."
I have not explicitly closed the newly created rst.
I am using:
cursorlocation of adUseClient
cursortype of adLockReadOnly
cursorlocktype of adLockOptimistic
What else can i check? The very next step after creating the rst I check the recordcount and that is when I am getting the error.
HELP!
There must be a problem with the query. So, you don't get any recordset.... this means the rst is closed.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Sep 20th, 2002, 12:10 PM
#3
Wow. Not much info to go off of. Here's what I got:
1) Make sure that there wasn't an error when getting the recordset. The Connection obj has an Errors collection you can check.
2) Make sure the connection wasn't closed (either on purpose or accidently).
3) Try posting the actual code. Sometimes the answer isn't obvious until some one else has looked at it too.
See if #1 or 2 help, if not, try #3.
PS: Go Clones!
-
Sep 20th, 2002, 12:22 PM
#4
Thread Starter
Lively Member
If I run the query in the data enviromnment designer and give the same input as I do in the app, I get the expected rst.... hmmmm?
I will continue to muddle away and get back to this if still unresolved later today.
Thanx ALL!
MDS
-
Sep 20th, 2002, 12:31 PM
#5
DEBUG!!!!!!!!!!!!!!!!!!!!!!!!!!!!
put a break point on the sub routine that gets the error... then step through each line to find out where it is erroring...
people don't use the debugger as much as they should... it saves a ton of headaches and time
-
Sep 20th, 2002, 12:43 PM
#6
Thread Starter
Lively Member
There was an error in the command text in my inner join - DUH!
Not sure why it worked in the dataenvironment and not in code, but then at this point it doesn't matter and i don't care!
-
Sep 20th, 2002, 12:48 PM
#7
Need-a-life Member
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
|