Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Environments

Status
Not open for further replies.

BlackBearDude

Programmer
Jan 13, 2003
33
US
I am using a DE and on a number of occassions have had VB tell me that a certain "task" can't be performed on a closed recordset. It does not occur all the time, which has lead me to wonder just when does a recordset get implicitly opened when it is established in a DE?
 
I've always found that the safe way is to close and re-open your connection:

With DataEnvironment1
If .Connection1.State <> 0 Then .Connection1.Close
DoEvents
.Connection1.Open
.Command1 (strParam1) 'or whatever here
End With



________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top