Send to two databases

P

Paul M

Hi
At the moment I have a database with projects that participants enter live
online using front page forms as usual. the form is rather long.
What I would like to do is have a seperate editing database or an editing
table within the projects database( whichever is best) where participants
can fill out the form at there own leasure and save it to the editing
database table using a save button. When they are happy with the entry they
press a button called submit to database, this would then populate the
projects database.
What would be the best way to do this?, I presume it will be some sort of
update query for the editing database
Can I have two buttons on the same page one to save to one database and one
to submit to another?
Thanks
Paul M
 
M

Mettá

Well you could have two db's or two tables and have an IF statement - if
field x equals 1 then save to db 1 if x less than 1 then save to db 2. I
don't think this will work with the FP DB wizard though.

Something like
<% If request,form("x")=0 Then %>
DB1 save
<%End If %>

<% If request,form("x")=1 Then %>
DB1 Update
<%End If %>

<% If request,form("x")=2 Then %>
DB2 save
<% End If %>

The if/else etc could be clearer depending on what criteria you set.


M
 
M

Mettá

To add... yes you can have a number of "submit" buttons within a form and
assign values to each to say send "x" to the update/add record page.

Ie button 1 - Add record to temp db - value 1
button 2 - update record in temp db - value 2
button 3 - add record to db2 - value 3
Assuming the original form is populated by the temp db?????

M
 
P

p c

2 tables is better than 2 databases. But if you want to conserve space
and be more efficient use only one table, but add an extra field to the
table for tracking whether the record is consider draft or final. Say a
yes/no field calld final.

During the first form submit add teh record to the tanle and set the
Final to False. After review of the data, submit the data to update te
record and set Fianl to True.

If you don't want to add the record to the dadabse in one trip (no field
for fanl), you could submit the form to a processing page prentated as
form for review/update. And if the person submits that form, the data
are shipped to the database. You just need one table.

Of course, you will need to use script.


...PC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top