Connection to foxpro databases use vb 6.0.
I'm getting a error message:
The connection cannot be use to perform this Operation. It is either closed or invalid in this context.
This is the code:
Dim cn As New ADODB.Connection
cn.Open "Provider=vfpoledb.1;" & _
"Data Source =D:\PerCap1\percap2.dbf;"
cn.Close
'Dim cn As Object
cn = CreateObject("ADODB.Connection"
cn.ConnectionString = "provider=vfpoledb.1;Data Source =D:\PerCap1\percap2.dbf"
cn.Open
I get to this code when the error message appears.
Set rs = cmd.Execute
I'm getting a error message:
The connection cannot be use to perform this Operation. It is either closed or invalid in this context.
This is the code:
Dim cn As New ADODB.Connection
cn.Open "Provider=vfpoledb.1;" & _
"Data Source =D:\PerCap1\percap2.dbf;"
cn.Close
'Dim cn As Object
cn = CreateObject("ADODB.Connection"
cn.ConnectionString = "provider=vfpoledb.1;Data Source =D:\PerCap1\percap2.dbf"
cn.Open
I get to this code when the error message appears.
Set rs = cmd.Execute