Hi,
Just wondering if there is a magic bullet for writing back/updating the SQL table from the cursor that was generated from the SQL select statement. The sqlexec() commands run and I get back a cursor that is the datasource for the grid. I make a change to the grid's cursor and now its time to writ it back to the sql table. It could also be coming from textboxes on a form as well.
One way is to use sqlexec() with a sql update statement in the grid's afterrowcolchange event.
A couple years ago, I tried the sql cursor adapters and had limited success. The SQL cursor adapter just seams like a late entry into VFP and still has unresolved issues.
I know how to do the SQL passthru stuff, and that all seams like a lot of code for something as simple [replace field1 with "new"]. Just hoping for a more efficient method (in terms of time and code).
And are there any commands or functions for processing a whole grid of changes all at once, like inside a save button?
If there are no better ways, I will probably create several generic SQL pass-thru classes, one for selects, one for updates and one for deletions and pass the specifics in by parms.
Just wondering what the options are.
Thanks, Stanley
Just wondering if there is a magic bullet for writing back/updating the SQL table from the cursor that was generated from the SQL select statement. The sqlexec() commands run and I get back a cursor that is the datasource for the grid. I make a change to the grid's cursor and now its time to writ it back to the sql table. It could also be coming from textboxes on a form as well.
One way is to use sqlexec() with a sql update statement in the grid's afterrowcolchange event.
A couple years ago, I tried the sql cursor adapters and had limited success. The SQL cursor adapter just seams like a late entry into VFP and still has unresolved issues.
I know how to do the SQL passthru stuff, and that all seams like a lot of code for something as simple [replace field1 with "new"]. Just hoping for a more efficient method (in terms of time and code).
And are there any commands or functions for processing a whole grid of changes all at once, like inside a save button?
If there are no better ways, I will probably create several generic SQL pass-thru classes, one for selects, one for updates and one for deletions and pass the specifics in by parms.
Just wondering what the options are.
Thanks, Stanley