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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Table

Status
Not open for further replies.

KingSlick

Programmer
Mar 9, 2007
45
US
Hi,

I have created a form that reads in the memo fields of a VFP table so that it may be updated. I compile/build the project that contains the form into an .exe file, and run the exe. The exe loads, however, when I try to update the table I get the following error...

Cannot update the cursor TEMP_DATA_FILE, since it is read-only.

TEMP_DATA_FILE is the name of the table that I am trying to update. I am using "REPLACE" on the table to update. I have included exclusive when using the table.

Code:
USE temp_data_file EXCLUSIVE

Then on the "click" procedure I have ...
Code:
lcTitle = ALLTRIM(thisform.edit1.Value)
lcMemo = ALLTRIM(thisform.edit2.Value)

REPLACE title WITH lcTitle
REPLACE abstract WITH lcMemo

SKIP
lcTitle = ALLTRIM(temp_data_file.title)
lcMemo = ALLTRIM(temp_data_file.abstract)
thisform.edit1.value = lcTitle
thisform.edit2.value = lcMemo

How can I get this to update just by using the "command1" button?

Thanks in advance
-Scott
 
Hi Scott,

Tables that are included in an exe can not be updated at run time. Perhaps you need to exclude the table when you build the exe.


Jim
 
Use the controlsource property of the editboxes and set them to the memo fields, then you don't need to replace the memo field contents.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top