Updating ODBC files via Basic + (OpenInsight Specific)
At 04 AUG 1998 06:31:19PM Bob Fernandes wrote:
I have a Data Warehousing procedure that updates a Foxpro file. I want to call(execute it) at the WRite event of a screen. I make the function all within the basic but don't have the proper delimiters for the Arguments required(Instruction, Handle, Info). Info requires the @id, @record, @dict & @mv but I don't know how send it. @FM does not work. Any ideas or am I going about this the wrong way.
Any help is appreciated,
Bob Fernandes
At 06 AUG 1998 07:22AM Cameron Revelation wrote:
Bob,
The warehouse procedures are designed to be executed from the warehouse manager. From your description, I would expect the "updates only" feature to be used (the "warehouse configuration" wizard in the client/server workspace) and the warehouse manager to be running on a repetetive schedule.
Cameron Purdy
Revelation Software
At 07 AUG 1998 12:39PM Don Bakke wrote:
Cameron,
Some background on the project Bob is working on:
An OpenInsight application is being used in the office to process orders for a manufacturing concern. Within the shop are PC's connected to the network which run a third party multimedia application that provides visual and audible instructions on processing parts for the order they are working on.
The worker is supposed to enter the order and then choose which part they need instructions on. Naturally, someone must feed this third party application this information before the order is given to the shop workers. Since the order and part information is already being entered into OpenInsight, we are trying to establish a link to this third party app (which uses FoxPro tables) during the WRITE event and update everything on the fly. The ideal is to make this seamless and invisible to the regular end users of OpenInsight.
Bob has been asking various questions towards getting to this point. One previous question on how to script all this out was answered by a suggestion to use the Wharehouse wizard since it would automatically generate the necessary scripts…which it did. Now Bob is trying to take these scripts and place them in the WRITE event of the OpenInsight form to automate this process.
Is this the most effective approach or is there some other way to go with this?
Thanks very much for your assistance,
At 07 AUG 1998 03:14PM Cameron Revelation wrote:
Don,
I would suggest either using the updates-only warehousing on a schedule (which would be asynchronous) or to just issue a set of insert/update statements (see QryMethod in the help file for a simple example of how to issue statements).
Cameron Purdy
Revelation Software
<code> function ExecuteScript(Script) $insert XO_Equates * returns @rm/@fm delimited results Results=" * create connection (this could take params if you wanted, * but calling it with no params lets the user choose what * connection, etc. this is how the query window calls it: hXO =XOInstance() hQry=0 if hXO then * create the query handle for the connection handle hQry=QryInstance(hXO) if hQry then * execute a script Flag=QryMethod(hQry, QRY_EXECUTE$, Script) if Flag then * retrieve results and stick them in an @rm delimited array loop Flag=QryMethod(hQry, QRY_GETROW$, Row) while Flag Results := @rm: Row repeat Results 1,1=" * cancel script Flag=QryMethod(hQry, QRY_CANCEL$) end else gosub error end * close the query handle Flag=QryMethod(hQry, QRY_DESTROY$) end else gosub error end * close the connection Flag=XOMethod(hXO, XO_DESTROY$) end else gosub error end return Results * Error handling Error: if hQry then Flag=QryMethod(hQry, QRY_GETERROR$, "", "", "", "", Text) end else Flag=XOMethod(hXO, QRY_GETERROR$, "", "", "", "", Text) end convert @vm to @tm in Text Def=" Def =Text Def=ExecuteScript Error" Def =!" Msg(@window, Text) Results=" return</code>