Replace?db=DatabaseName&searchdata=xx&field1=xx&field2=xx
To replace records in a database, use a web browser to link to a URL containing the Replace command (alternately, you may embed a [Replace] context into a template). Whenever WebDNA receives a Replace command, it immediately searches for the specified records in the database, and replaces those records' fields with the named field values.
Example (normally you would link to a URL or form containing the following information):
The database "SomeDatabase.db" opens and all records whose name field is "Grant" are found. The field names "name" is set to "John," "address" is set to "1492 Somewhere Lane," and "zip" is set to "90000."
Any fieldnames not existing in the database are ignored, and
any fields you do not specify are left blank in the new record.
Certain letters are illegal, such as <tab> or <carriage
return>, so they are converted to <space> and <soft
return> before being added to the database. Some computers
use the two-character sequence <carriage return><line
feed> to indicate a single end of line, which is converted
automatically to a single <soft return> character before
being added to the database.
You may specify a relative or full URL to the database file, as
in "/WebCatalog/Folder/SomeDatabase.db" or "../SomeDatabase.db".
The path to the database is always relative to the template URL,
so if the database is in the same folder as the template the path
would be "SomeDatabase.db", and if the database were
one folder up then the path would be "../SomeDatabase.db".
Here are some equivalent ways to send the same command:
HTML Source | Description |
---|---|
|
Hyperlink command |
|
|
Parameters for Replace:
Parameter | Description |
---|---|
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. |