Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Cursor Adapter
Message
 
To
19/05/2005 15:23:37
Ernie Haffner
Empire BlueCross BlueShield
Melville, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01015978
Message ID:
01015993
Views:
19
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform