Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting records to SQL Server
Message
From
29/10/2001 17:38:56
 
 
To
29/10/2001 17:10:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00574760
Message ID:
00574775
Views:
34
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform