Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting records to SQL Server
Message
De
29/10/2001 17:38:56
 
 
À
29/10/2001 17:10:05
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00574760
Message ID:
00574775
Vues:
33
>Hello eveyone,
>
>I am trying to insert records to a SQL Server table. I have never done it. So if anybody can show me an example or tell me where I can found one I would really apreciated.
>
>Thanks,
>Sergio

Simple example with SPT that uses a DSN set for trusted connection:
nHan = SqlConnect("mySqlDsn")
nRes = SQLExec(nHan, "Insert Into myTable Values ('value1', 'value2', 3.5)")
Where a nHand or nRes value of -1 would indicate failure of either SqlConnect() or SqlExec(). A better approach is to use stored procedures, but that is another subject.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform