General information
Category:
ActiveX controls in VFP
Title:
ADO and SQL into VFP tables
It seems that every time I try getting an ADO connection to insert or update data in a VFP table I can only use character as a data type, I can't even get integer types to work. Here is an example of the code:
&& It takes the sql satement and the DSN as parameters
Sub ADODBRequest(cDSN , sqlComm As String) ' Open an ADO Connection to a datasource and execute a SQL statement that is passed as the parameter CLW 09/2/99
Dim iDB as Object
Dim iRS as Object
Dim x as Integer
'Instantiate ADODB object
Set iDB = CreateObject("ADODB.Connection")
'Open Connection
iDB.Open cDSN
' MsgBox "The Completed connection string is: " & iDB.ConnectionString ' For debugging
'Execute a query
Set iRS = iDB.Execute(sqlComm)
'Close Connection
iDB.Close
'De-reference object
Set iDB = nothing
End Sub
Thanks, Casey
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only