Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 8 - SQL 2000 db - need advice with inefficient updating
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
VFP 8 - SQL 2000 db - need advice with inefficient updating
Miscellaneous
Thread ID:
00825623
Message ID:
00825623
Views:
56
like most of us I am using VFP with a remote SQL database more and more. I am getting used to it but one thing which I find really inefficient is updating the SQL database. Below is an example of a VFP .prg that updates an email address field in the SQL table. As you can see I am currently updating one record at a time. This is the same way I was doing in earlier versions of VFP. Is there any way to make the update below more efficient in VFP 8.0?

***select VFP table
select emailtoprocess

***update SQL table
SCAN
scatter memvar
= sqlprepare(gnConnHandle, "UPDATE Emailunsubscribe SET bademail = 1 WHERE email = ?m.email")
= sqlexec(gnConnHandle)
endscan
Next
Reply
Map
View

Click here to load this message in the networking platform