Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Cursor Adapter
Message
 
À
19/05/2005 15:23:37
Ernie Haffner
Empire BlueCross BlueShield
Melville, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01015978
Message ID:
01015993
Vues:
20
>Can anyone share any code snippets that show how to use a CURSOR ADAPTER to insert records into a SQL Server database ?? Thank you.

Ernie,
by example:
you have 'firms.dbo' in SQL Server database with structure:
mycode int(4) identity(yes)
myname nvarchar(30)


and CA with:

selectcmd
select Firms.myName from Firms

KeyFieldList:
mycode

UpdateNameList:
myName firms.myname

UpdatableFieldList:
myName


In init of form
this.DataEnvironment.AddObject("Firms","Firms")
this.DataEnvironment.Firms.CursorFill()
In add record button
INSERT INTO Firms (Name) VALUES ("the firm's name")
HTH
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform