CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Sql in custom code - once again

Print topic Send  topic

Author Message
Kaare
Posted: 07/26/2005, 10:55 AM

:-O
I have problem how to write a sql statement. I have to tables. From table 1 I want to update table 2 with some values from table 1.

The project is based one results from a soccermatch (table1) and after that I want to update leaguetable in table 2

A secon question : How do I refer to a variable in a form!!!! and If you have a good exsample that I can use - I'll be a happy man.


Here is my code:
Function KampOpp_DataSource_BeforeExecuteUpdate() 'KampOpp_DataSource_BeforeExecuteUpdate @2-F1872579

'Custom Code @320-73254650
' -------------------------
DIM SQL
DIM CONNECTION
DIM ERRORMESSAGE
SET CONNECTION = NEW clsDBAltaturnAdm

connection.open
sql = "UPDATE PAMELD1 SET PAMELD1.ANTMAAL = valuefromtable1_1 AND PAMELD1.ANTMALMOT = ValuefromTable1_2 WHERE PAMELD1.ID = Form.value"
connection.execute
erromessage = CCProcessError(connection)

sql = "UPDATE PAMELD1 SET PAMELD1.ANTMAAL = BMAAL AND PAMELD1.ANTMALMOT = HMAAL WHERE PAMELD1.ID = BREFNR"

connection.execute
erromessage = CCProcessError(connection)
connection.close
set connection = nothing
on error goto 0
' -------------------------
'End Custom Code

End Function 'Close KampOpp_DataSource_BeforeExecuteUpdate @2-54C34B28


Add new topic Subscribe to topic   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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