Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Pervasive SQL (btrieve) thru ODBC in VFP 6

Status
Not open for further replies.

BBartlow

Programmer
Aug 15, 2002
2
US
I have established a connection to a btrieve data file using ODBC system DSN. Actually the file is Pervasive SQL 2000, but still has BTR extension.

I'm using VFP 6 and am setting this up in the project manager, rather than using the command window. I have added a connection and I have added a remote view using that connection in the Data section of the project manager. I have no problem pulling up data and browsing it in the remote view. My problem is updating. I change data in the browse window or issue a replace command from the command window and then issue TableUpdate(). My view changes, but when I go back to the btrieve (Pervasive SQL) table in the original software using it, nothing is changed. What am I missing here? I have 29 betrieve tables on which I need to change customer numbers SOON. Any help?

My update criteria on the remote view definition are Key and modified fields and SQL update. The customer number is flagged as the key. I thought maybe the problem might be related to attempting to update the key field, but have tried updating other fields with no better success.

Barbara
 
if you have send updates box checked in the view designer. then try using CURSORGETPROP('SendUpdates') to see if it is set. Attitude is Everything
 
Danceman,

You were on the right track. Send SQL updates was not on. However, with it on I still can not update the customer number which is the key. I tried changing the key to customer name, and was able to update the customer number then. However, that does not seem like the proper solution. Customer name is certainly not unique and not truly a suitable key. I've tried all the various setting for the SQL where clause, with no better success. Any additional ideas.

Barbara
 
nothing other then going over each field to check for the check mark next to each one that you want updated and the check mark next to the key field. Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top