CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 After insert event?

Print topic Send  topic

Author Message
Rene
Posted: 07/06/2003, 6:16 AM

Hiiii,
I dont know how can I insert some of the fields in the first form into another table after the submit is done.

first form has (ActivityCode, Activitytitle)

I would like to have another insert into another table (ActivityCode, UserID)

SQL is "Insert into UserAssign (ActivityCode,UserID) values (ActivtyCode, UserID) how do i write it in asp. Just the SQL statement

ActivityCode is not autoincremented, text, and taken from the form that was just submitted and UserID is taken from session.


Anybody can help me with the Statement?
ASP, IIS, ACCESS, CCS2.1
GreggB
Posted: 07/07/2003, 10:23 AM

Rene

I’m not sure I follow what you’re asking but here’s the code I use in Events “After Update & After Insert”. These “Events” can be found by clicking on the “Form” and selecting the “Events” tab under “Properties”.

Using the “DByourconnection.Execute()” should allow you to use standard SQL Language and syntax. Below are some examples using “Update” with CCGetParam() and CCGetUserID and an "INSERT" example. You can use “Insert” or any other SQL commands.



Example 1 UPDATE: Using employee_id from a ListBox in a Search Form:

DByourconnection.Execute("UPDATE employees_table SET employee_name = 'Frank Williams' WHERE employee_id = " & CCGetParam("s_employee_id", Empty)

Example 2 UPDATE: Using UserID from a Users Session:

DByourconnection.Execute("UPDATE employees_table SET employee_name = 'Rene' WHERE employee_id = " & CCGetUserID)

Example 3 INSERT: Here is an example of an “INSERT”
DBisoperations.Execute "INSERT Checks (chk_sch_id, group_id, chk_desc_id, chk_freq_id, office_id, facility_id, dept_id) VALUES(" & n_chk_sch_id & ", " & n_group_id & ", " & n_chk_desc_id & ", " & n_chk_freq_id & ", " & n_office_id & ", " & n_facility_id & ", " & n_dept_id & ")"



I hope this helps even though I don’t think I followed what you are asking.

GreggB
Rene
Posted: 07/08/2003, 1:09 AM

Thanks man I'll try it and I'll get back to you, I am kindda busy these days :) thanks alot :)

With love,
Rene,

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.