DerFarm
Programmer
- Mar 10, 2003
- 25
Code:
Conn.ConnectionString = BuildConnectionString(TargetDB)
strTemp0 = ...code to build a select query...
strTemp1 = CreateView(TargetDB, strTemp0, "CountMatches")
CountMatches_RC.Open "CountMatches", Conn, adOpenForwardOnly, adLockReadOnly
CountMatches_RC is properly declared as New ADODB.Recordset
CreateView is a function which creates a query and puts it in the TaregetDB...it works and I can see the query when I open the target, and it runs properly when opened.
at the open statement I get the error:
"The connection cannot be used to perform this operation. It is either closed or invalid in this context"
The views have been refreshed and are available at the run time.
Any suggestions?