Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic updates of data returned by stored procedure
Message
 
 
To
15/01/2008 06:39:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01281864
Message ID:
01281866
Views:
7
Yes, you can make SPT cursor updatable but connection has to be kept open. See mskb #Q138094 How to Create Updatable Views by Using SQL Passthrough and How to make SQL Pass-Through cursor updatable FAQ #8153.
>
>is there any chance to arrange an automatic updates of the data (cursor) returned by SP of MS SQL?
>
>Somehow like this example?:
>oSQL=CREATEOBJECT("rs_SQL","newcontrade",.f.)
>oSQL.cSQL="exec sp_OBS_AddBatchAIG 2"
>oSQL.lIdle=.f.
>oSQL.CSQLCURSOR="vOBS_ReadyAbout"
>IF oSQL.ExecuteSql() < 0
>	oSQL.ReleaseConn()
>	RELEASE oSQL
>	oSQL=.null.
>	RETURN
>ELSE
>	oSQL.ReleaseConn()
>	RELEASE oSQL
>	oSQL=.null.
>	INDEX on s_Contract_No TAG Contr
>	INDEX on s_Client_Surename TAG Clien
>
>*could next line work?
>
>	=CURSORSETPROP("KeyFieldList","instr_id,x_batch",oSQL.CSQLCURSOR)
>	=CURSORSETPROP("Tables","tbl_OBS_AIG",oSQL.CSQLCURSOR)
>      =CURSORSETPROP("UpdatableFieldList","Gen,Low,Placement",oSQL.CSQLCURSOR)
>	=CURSORSETPROP("UpdateNameList","gen tbl_OBS_AIG.OBS_AIG_GenEnable, 
Low tbl_OBS_AIG.OBS_AIG_LowerEnable, Placement tbl_OBS_AIG.OBS_AIG_Placement",oSQL.CSQLCURSOR)
>	=CURSORSETPROP("SendUpdates",.T.,oSQL.CSQLCURSOR)
>*---------
>
>ENDIF
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform