werner schoenfeldinger
|
Posted: 04/05/2001, 3:27 AM |
|
Hi CodeChargies,
Could someone give me some hints HOW (short example) you would do a double
insert (in a State-Table and an Journal-Table) after submitting a form?
thanks 1000 times
-schoenf
|
|
|
CodeCharge
|
Posted: 04/06/2001, 12:10 AM |
|
Since you already purchased CodeCharge, I will email you our support system,
which we use at http://support.codecharge.com
In this system you will find Page "admCaseResponses" with Form "Response",
which makes several table updates.
When we respond to a support case, CodeCharge inserts our response into
"support_responses" table, but it also makes 2 updates to external tables.
This is done with the following "After Insert" Event:
'After Insert Event - ASP
'Change the Status, Priority, Date and Responsible Person in "support_cases"
to match the record just added to "support_responses" table
update_case_sql = "update support_cases set " & _
"[status_id]=" & ToSQL(fldstatus_id, "Number") & ", " & _
"[priority_id]=" & ToSQL(fldpriority_id, "Number") & ", " & _
"[date_last_update]=" & ToSQL(flddate_posted, "Date") & "," & _
"[assigned_to]=" & ToSQL(fldassigned_to, "Number") & _
" where case_id =" & ToSQL(fldcase_id, "Number")
cn.execute update_case_sql
'Mark current support case record as Unlocked
sql = "update support_cases set locked_by=0 where case_id=" & fldcase_id
cn.execute sql
As you can see, we're simply executing couple updates through SQL
statements, based on the data just entered into the form.
All Form data is stored in the variables made of prefix "fld" and the
database field name.
"werner schoenfeldinger" <schoenf@chello.at> wrote in message
news:9ahh9v$d37$1@mail.tankhill.com...
> Hi CodeChargies,
>
> Could someone give me some hints HOW (short example) you would do a double
> insert (in a State-Table and an Journal-Table) after submitting a form?
>
> thanks 1000 times
> -schoenf
>
>
|
|
|
|