sappie
Posts: 13
|
| Posted: 10/16/2007, 3:44 AM |
|
I have an editable grid (called "RFC_Transport") which updates a certain table. This works fine.
Now I want a second table to be updated:
In the editable grid I have the elements "RFC_Id" (link) which is the key field for the second table. Further the grid contains the radiobutton "TP_MD3_RC".
If this radiobutton has a certain value ( <> 999) I want the second table to be updated.
To achieve this I used the example of Nicole (http://forums.codecharge.com/posts.php?post_id=60507) in the 'BeforeExecuteUpdate':
----------------------
Dim SQL
Dim Connection
Dim ErrorMessage
Dim RFCID
Dim MD3RC
Dim j
for j = 1 to RFC_Transport.PageSize + RFC_Transport.EmptyRows
RFCID = CCGetParam("RFC_Id_" & Cstr(j), Empty)
MD3RC = CCGetParam("TP_MD3_RC_" & Cstr(j), Empty)
If MD3RC <> 999 Then
Set Connection = New clsDBRFC
Connection.Open
SQL ="UPDATE RFC SET RFC_Status=98 where RFC_Id=RFCID"
Connection.Execute(SQL)
Connection.Close
Set Connection = Nothing
End If
next
----------------------
Unfortunately the update op the second table (RFC) doesn't happen.
Seems to me the control values of the editable grid aren't fetched. Because if I replace them ('MD3RC' or 'RFCID') with fixed values the second table is updated.
Can someone please help me out? I've searched for answers on the forum but didn't succeed in finding the answer.
What I'm I doing wrong? Is there an error in the coding or is it in the wrong place?
Kind regards,
Harold
|
 |
 |
|