Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another CursorAdapter Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00892617
Message ID:
00892650
Views:
19
But why? You can expand Your function parameters:
FUNCTION GetHistoryData(sAlias, sSqlCmd, sUpdatable, sUpdateName)

sUpdatable  = IIF(TYPE("sUpdatable")  # "C","Id, DoneDate", sUpdatable)
sUpdateName = IIF(TYPE("sUpdateName") # "C",""DoneDate History.DoneDate", sUpdateName)

SELECT 0
USE History

oAdapter = CREATEOBJECT("CursorAdapter")

WITH oAdapter

  .Alias = sAlias
  .DataSourceType = "Native"
  .DataSource = ""
  .SelectCmd = sSqlCmd
  .KeyFieldList = "Id"
  .Tables = "History"
  .UpdatableFieldList = sUpdatable
  .UpdateNameList     = sUpdateName

ENDWITH

USE IN History

RETURN
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform