|
-
Dec 29th, 2000, 08:32 PM
#1
Thread Starter
Hyperactive Member
Hello,
I have a problem and i am sure there is a simple solution. When i create a connection and a recordset in the click event of a button, i can't access the recordset's or connections's properties outside of the sub. It just gives me the "object required" msg. I can manipulate them inside of the same sub, but that's it.
Dont ask y i posted this in this forum, cause i dont know
Thanks in advance!
Kyle
[Edited by Kagey on 01-02-2001 at 07:59 PM]
-
Dec 30th, 2000, 10:30 AM
#2
Hyperactive Member
Is your object Variable going out of scope ?
[]P
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Dec 30th, 2000, 10:46 AM
#3
Thread Starter
Hyperactive Member
apparently it is. i created it using
Code:
Dim conn as new adodb.connection
Dim rst as new adodb.recordset
when i do this, i can only access their properties inside of the same sub.
-
Dec 30th, 2000, 10:25 PM
#4
Thread Starter
Hyperactive Member
Never mind, i figured it out. thanks for your help though. It helped me out (which is why it is called help).
later
-
Dec 31st, 2000, 08:22 PM
#5
Thread Starter
Hyperactive Member
in general declarations
Code:
Private WithEvents con As ADODB.Connection
Private WithEvents rst As ADODB.Recordset
then in the sub i put
Code:
Set con = New ADODB.Connection
Set rst = New ADODB.Recordset
is there a more efficent way of doing it?
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
|