Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select statement
Message
 
To
11/01/2002 11:11:33
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00603529
Message ID:
00603572
Views:
19
>I am using 2.6, although I have 7.0(it's a migrataion thing).
>My question:
>Using the sql select statement, is there any way to write to the results, and update the database?
>example
>I have 1000 different locations, with several customers for each location. I want to tag 1 record for each location.
>There are several ways to do this, but I was hoping to discover a way to write directly to the data that meets the criterea. Any help?

If I understand you correctly, yes.

For remote data:
lnHandle = sqlconnect(DSN)
lcSql = "select * from ding where dingno = dingdong"		
lnReturn = sqlexec(lnHandle,lcSql,'TMPCUR')
if lnReturn > 0
   select tmpcur
   * Do something with your data
   cursorsetprop("Tables","dbo.ding")
   cursorsetprop("UpdateNameList",cRemoteTables)
   cursorsetprop("KeyFieldList","Dingno")	
   cursorsetprop("UpdatableFieldList",cFields)
   cursorsetprop("SendUpdates",.T.)
   cursorsetprop("Buffering", 3)
   tableupdate(.T.,.T.)
endif
Check cursorsetprop in help for a detailed explanation.
For local data use Booth's example, or create a local view instead of a cursor.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Reply
Map
View

Click here to load this message in the networking platform