sjgrodriguez
Posts: 26
|
Posted: 06/21/2011, 6:58 AM |
|
Here i come again. What i need to know now is how to insert a row in an editable grid and update another row, at the same time.
I cant find the way. I only get to insert or update, but never both at the same time.
Please help me !
Thanks in advance,
Sergio
|
|
|
Waspman
Posts: 948
|
Posted: 06/21/2011, 3:08 PM |
|
Custom insert script after update event.
_________________
http://www.waspmedia.co.uk |
|
|
sjgrodriguez
Posts: 26
|
Posted: 06/21/2011, 11:17 PM |
|
@waspman
Thanks for your help. However, it doesn´t work. I have set a custom Insert and After Execute Update event, but it only updates. The insert is not done.
If i set a custom insert and update event with the SQL INSERT INTO and i set an After Execute Update Event, only the insert is done, not the update.
Custom Insert:
INSERT INTO amistad(id_amigo, id_usuario) VALUES({id_usuario}, {id_amigo})
After Execute Update Event:
Dim Connection
Set Connection = New clsDBTRUEKE
Connection.Open
Connection.Execute("UPDATE amistad SET confirmado={confirmado} WHERE id_amigo = {id_amigo} AND id_usuario = {id_usuario}")
Connection.Close
Set Connection = Nothing
On Error Goto 0 Custom Insert After Execute Update Event:
Any ideas??
Thanks man
Sergio
|
|
|
sjgrodriguez
Posts: 26
|
Posted: 06/21/2011, 11:18 PM |
|
The bold line is not part of the code, sorry ;)
Sergio
|
|
|
TheunisP
Posts: 342
|
Posted: 06/29/2011, 6:00 AM |
|
is the {confirmado} for example or is it how you coded the asp - if the latter then that is your problem to start with.
In CCS it is possible to setup a custom insert/update and force the normal insert/update to fire as well.
|
|
|
sjgrodriguez
Posts: 26
|
Posted: 06/30/2011, 11:07 AM |
|
Thank you TheunisP
Im working on it already.
I will show the results
Regards,
Sergio Gómez
|
|
|
|