Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know # of recs affected in ODBC SQL update?
Message
From
06/05/2002 10:50:21
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00652817
Message ID:
00653071
Views:
16
>When I execute an SQL update via ODBC in an Active Server Page script (using the VFP ODBC driver), how can I determine how many records were actually affected by the update? Thanks!

For a web page the VFP OLEDB provider will give you better scalability, and it would be easy to get the affected records like so:
nRecs = 0
cStr = "Provider=VFPOLEDB.1;Data Source=D:\temp\mydata.dbc;"
Set oCn = Server.CreateObject("adodb.connection")
oCn.ConnectionString = cStr
oCn.Open()
oCn.Execute("update mytable set myfld='xxyy' where mykey='UPD00025'", nRecs, 128)
If you don't have VFP7 the other option is to build a COM object that does the update and returns the _tally value.
Previous
Reply
Map
View

Click here to load this message in the networking platform