|
-
January 27th, 2000, 11:35 AM
#1
ADO
How come I couldn't open it the second time?
THese are my code:
'I open the connection and myTable fisrt time:
With DataEnvironment1.cnnVendor
.ConnectionString = "Persist Security Info=False;User ID=Admin;" & _
"Data Source=" & MyDatabaseName & ";"
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeReadWrite
.Open
End With
DataEnvironment1.rsMyTable.Open
end with
'I close my connection and myTable:
DataEnvironment1.rsMyTable.close
DataEnvironment1.cnnVendor.close
'I open the connection and myTable second time (exactly the same code!!!)
With DataEnvironment1.cnnVendor
.ConnectionString = "Persist Security Info=False;User ID=Admin;" & _
"Data Source=" & MyDatabaseName & ";"
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeReadWrite
.Open
End With
DataEnvironment1.rsMyTable.Open
end with
---> but the last line "DataEnvironment1.rsMyTable.Open" bomb ???
The error say :"operation on an object with a reference to a closed or invalid Connection object."
Please help me out.
Thanks
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
|