I get a Error Message when I get to intRecordAffected. The Error Message is Syntax Error.
Here is the code for Update:
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
'cmd.CommandText = strSQL
'Declare and Set the RecordSet
Dim rs As...
I'm check to see if the record is update or not. when I step through it, I get to the code
cmd.Execute intRecordAffect
then I get the error message. what else do you want to knew.
The ERROR MESSAGE is between the ************
************
Set cn = CreateObject("ADODB.Connection")
cn.ConnectionString = "Provider=vfpoledb.1;Data Source =D:\PerCap1\percap2.dbf"
cn.Open
'Formatting Date
strSTR =...
Set cn = CreateObject("ADODB.Connection")
cn.ConnectionString = "Provider=vfpoledb.1;Data Source =D:\PerCap1\percap2.dbf"
cn.Open
'Create a SQL String
strSQL = "Select * from percap2 where Name Like "
strSQL = strSQL & "'" &...
'Create a SQL String
strSQL = "Select * from percap2 where Name Like "
strSQL = strSQL & "'" & Trim(cboNAME.Text & "%") & "'"
'Declare and set the Command
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.CommandText = strSQL...
Access foxpro database with VB 6.0. I get error message when I get to this code: Set rs = cmd.Execute
The error message is:
The connection cannot be used to perform this operation. It is Either closed or invalid in this context.
This is the code to connect:
Dim cn As New...
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;" & _...
I even try this code:
Dim strFilePath As String
strFilePath = "Data Source =D:\PerCap1\PerCap2.dbf"
Set cn = New ADODB.Connection
cn.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"strFilePath" & ";" & _...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.