Kaare
|
| Posted: 07/26/2005, 10:55 AM |
|

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
|
|
|
 |
|