Hi,
Having some issues with using remote views in .prg and object events code. I'm new to this whole remote view stuff. Creating a form with a remote view as its data source is working as expected, however when I close the form remote view data is also closed. It makes sense for this to be normal behavior. Some questions...
1. I have only been able to add data using the append and replace commands on the form. Issuing an "insert into" statement fails the debugger.
2. After doing a append blank, stuffing data, followed with a tableupdate() does insert the data but when closing the form I get the ???? revert option. If I use tableupdate(.T.,.T.) I don't get the revert data option. Isn't (.T.,.T) a bit extreme with only a single user, me?
I see by manually browsing a remote view via the gui, it inserts into the command window these three lines,
which suggests as the way to use them via code. I've had issues in getting a stable predictable behavior. Right now, I'm getting a program error "G:\path\remoteview.dbf does not exist." after using the exact code the manual browsing process places in the command window. I get this after issuing a tableupdate() than a form release, which drops me back to the calling program as expected. Then I close the main program and get this error from the shutdon code in which I am using the commands the manual browse uses.
I was previously using sql passthru and is just too much work to use in an entire app, so I went looking for an easier way that closely mimics vfp's data engine and commands. Looks like remote views could be the answer, if I can only get a handle on how to use it, such as when to requery(), tableupdate(), using thein in forms, .prgs and ??
Any explanations would be appreciated,
Stanley
Having some issues with using remote views in .prg and object events code. I'm new to this whole remote view stuff. Creating a form with a remote view as its data source is working as expected, however when I close the form remote view data is also closed. It makes sense for this to be normal behavior. Some questions...
1. I have only been able to add data using the append and replace commands on the form. Issuing an "insert into" statement fails the debugger.
2. After doing a append blank, stuffing data, followed with a tableupdate() does insert the data but when closing the form I get the ???? revert option. If I use tableupdate(.T.,.T.) I don't get the revert data option. Isn't (.T.,.T) a bit extreme with only a single user, me?
I see by manually browsing a remote view via the gui, it inserts into the command window these three lines,
Code:
use remoteview again in 0
select remoteview
browse
which suggests as the way to use them via code. I've had issues in getting a stable predictable behavior. Right now, I'm getting a program error "G:\path\remoteview.dbf does not exist." after using the exact code the manual browsing process places in the command window. I get this after issuing a tableupdate() than a form release, which drops me back to the calling program as expected. Then I close the main program and get this error from the shutdon code in which I am using the commands the manual browse uses.
I was previously using sql passthru and is just too much work to use in an entire app, so I went looking for an easier way that closely mimics vfp's data engine and commands. Looks like remote views could be the answer, if I can only get a handle on how to use it, such as when to requery(), tableupdate(), using thein in forms, .prgs and ??
Any explanations would be appreciated,
Stanley