Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO and SQL into VFP tables
Message
From
03/09/1999 16:35:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
ADO and SQL into VFP tables
Miscellaneous
Thread ID:
00261366
Message ID:
00261366
Views:
63
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
Map
View

Click here to load this message in the networking platform