Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Table Update
Message
From
29/03/2013 09:10:16
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01569522
Message ID:
01569528
Views:
51
Sergey

The PK field is a unique record ID, set by SQL Server itself, and the 10 records I'm editing all exist, it's purely a read from SQL. VFP runs a stored procedure from SQL Server, along the lines of:

begin
set nocount on;
select * from dbo.MyTable where RecordLive = 1
end

My VFP code performs this stored procedure, returns a dataset, loops through each record in the dataset, modifies data in each record, and then once all modifications have been done to each record the VFP code performs a table update. When you return to SQL you see that the modifications that you've done to record 10 are copied across to records 1-9, rather than 1-9 having their own unique updates.
Previous
Reply
Map
View

Click here to load this message in the networking platform