CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 After insert, Update diffrent Table (HELP)

Print topic Send  topic

Author Message
AudiTT @ MCI
Posted: 02/06/2002, 10:06 AM

Ok, here goes. I have looked all over this site and yet to have found an ASP example.

I am running CC2.0.4, NT4.0, ASP, and MS SQL 2000 Enterprise.

I have a from (CMR_Depen) that has a link to a form called CMR_CalendarAdd. When the link is pressed, it passes the key called 'CMR' and a few other things.

CMR_CalendarAdd points to a table called Schedule, and when I insert a record into Schedule, I want a field that is called On_Calendar in the table CMR_Main to equel 1 (its a bit).

Please tell me how to do this. I am brain dead.

If some one gives me a usable answer, I will send them a calling card from my company for 60Min... its the least I can do...

Thanks.
Ken Hardwick
Posted: 02/06/2002, 11:19 AM

In the "after Insert" event, create the appropriate SQL string and then execute it. Something like below...

sWhere = "PERSON_ID=" & ToSQL(session("currentid"), "Text")
fldUSER_ID = Session("EPS_id")


sSQL = "update KMG_EPS_LOC set " & _
"Travel = " & ToSQL(fldTRAVEL, "Text") & _
",ACT_DTM=" & ToSQL(now, "Date") & _
",USER_ID=" & ToSQL(fldUSER_ID, "Text")
sSQL = sSQL & " where " & sWhere

cn.execute sSQL

Ken@KenHardwick.com
AudiTT @ MCI
Posted: 02/06/2002, 12:09 PM

Here is what I used, it took some tweaking..

Email me your contact info for the card.. If you want the second one, I need more help.. I cant get the login trick to work..

bryan.caddy@wcom.com

sCMR = "CMR=" & ToSQL(fldCMR, "Numeric")

sSQL = "update CMR_Main set " & _
"On_Calendar = " & ToSQL("1", "Numeric")
sSQL = sSQL & " where " & sCMR

cn.execute sSQL

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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