CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 INSERT AND UPDATE at the same time

Print topic Send  topic

Author Message
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
View profile  Send private message
Waspman

Posts: 948
Posted: 06/21/2011, 3:08 PM

Custom insert script after update event.
_________________
http://www.waspmedia.co.uk
View profile  Send private message
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
View profile  Send private message
sjgrodriguez

Posts: 26
Posted: 06/21/2011, 11:18 PM

The bold line is not part of the code, sorry ;)

Sergio
View profile  Send private message
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.

View profile  Send private message
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
View profile  Send private message

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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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