[Replace Parameters]new values[/Replace]

Replaces each found record in a database with the new field values.

To replace records in a database, put a Replace context into a template (alternately, you may use the Replace command from a URL or a FORM). Whenever WebCatalog encounters a Replace context, it immediately searches for the specified records in the database, and replaces those records' fields with the named field values inside the Replace context.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

[Replace db=SomeDatabase.db&eqNAMEdata=Grant]name=John&address=1492 Somewhere Lane&zip=90000&date=[date][/Replace]

Try It!

The database "SomeDatabase.db" is opened, all records whose name field is "Grant" are found, and fieldname "name" is set to "John", fieldname "address" is set to "1492 Somewhere Lane", fieldname "zip" is set to "90000", and fieldname "date" is set to the current date. Notice that any WebCatalog [xxx] tags inside the context are first substituted for their real values before being written to the database. The name of the database itself may also be an [xxx] tag, as in "[Replace db=[FormVarable]]".

Any fieldnames that do not exist in the database are ignored, and any fields you do not specify are left unchanged. You may specify an absolute or relative path to the database file, as in "/WebCatalog/GeneralStore/SomeDatabase.db" or "../SomeDatabase.db".
 Parameter  Description

 db

path to database file, relative to this template

 SearchParameters

Search information that describes which records should be found and replaced. Can be any complex search criteria, works exactly like Search command or [Search] context.

Append

(Optional) "T" if you want a new record to be added to the end of the database in the case where no records were found to be replaced.