Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO and SQL into VFP tables
Message
De
03/09/1999 16:35:46
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
ADO and SQL into VFP tables
Divers
Thread ID:
00261366
Message ID:
00261366
Vues:
64
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform