main logo
Subject: Using remote views on bizobjform to update Oracle tables
Author: Mike Devlin
Posted: 2002/03/21 13:22:36
 
View Entire Thread
New Search


Hey all,
I am having a problem using the bizobj form to update an Oracle table using a remote view. I have everything set up as far as the view and the ODBC
connection goes, since I can browse the view and use the browse window to update the Oracle table. This works fine. But, when I use the remote view in the
form, the data is not sent back to the Oracle table.
I click on the new button (call thisform.new()), which sets up the new record in the view, with the default value in the nid field, newid() from the view properties.
All is working fine up til now. When I click save (call the thisform.save()) everything seems to work fine in the code, but the record is never sent to the Oracle
table. The TableUpdate returns .T., which gives me the "information saved" wait window. My assumption is that the 'TABLEUPDATE()' would just simply do the
job, without any other coding involved, other than setting up the ODBC and the remote views to be updateable.
I have read some of the threads from 2001 which discuss the use of VFP transactions. I made a new i-layer class called 'iremoteviewbehavior'. I edited the
begin, commit and rollback transactions methods and used the SQLSETPROP(CURSORGETPROP('ConnectHandle'), 'Transactions', 2), which returns 1, to
make sure that I am ready to perform manual SQL updates. In the commit I use SQLCOMMIT(CURSORGETPROP('ConnectHandle')), which I am thinking
should manually send the data to the back end table. I am getting txnlevel() = 1, so a transaction is in progress.
I traced through the cdataenv.init() and the DE is set up so lUseLocalData = .F. from the dbpaths table. The remote view instantiates properly. I have traced
my way through the save() code and everything works as it normally does with local views, but the data (new record) is not sent.
I have downloaded the most current version of the Oracle ODBC driver from the Oracle web site (which is the driver I am assuming I am to use to perform the
updates from the VFP forms, although I had to use the MS ODBC driver for the upsizing wizard).
I was experiencing 'Driver not Capable' errors from the save error handler, but I am now using a simpler view, just to get this process moving, so that error no
longer rears its ugly head. So far, I am unable to get this working, even though it seems that everything should work. I cannot use SQL Pass through, since I
need the remote views to get the data into controls on the forms.
I am also assuming that I must be missing something or just doing something wrong.
PLEASE HELP!!!
Thanks
Devman
mdevlin AT ajdebruin .DO.T com

 
©2002 Mike Devlin
<-- Prior Message New Search Next Message -->