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

 Can we use two different conn.execute against the same table.

Print topic Send  topic

Author Message
Kaare
Posted: 07/27/2005, 1:48 AM

Thank you for your help so far. I'm a beginner with custom code, so that why you get a lot of silly question.

My question this time is, can we use two different sql-statement against the same table - (pameld1).

sql1 = "UPDATE PAMELD1 SET PAMELD1.ANTMAAL = pameld1.antmaal + "&hmal&" WHERE (PAMELD1.ID = 105) and (pameld1.klubbid =1)"

sql2 = "UPDATE PAMELD1 SET PAMELD1.ANTMAAL = PAMELD1.ANTMAAL + "&bmal&" WHERE (PAMELD1.ID = 207) and (pameld1.klubbid =25)"


this is the first excecute -
conn.execute(sql1)
errormessage = CCProcessError(conn)

this is the second
CONN.EXECUTE(SQL2)
errormessage1 = CCProcessError(conn)

conn.close

I got no errormessages, but only sql1 update pameld1. Do I need to make a alias for sql2 ?

regards Kaare
donb

Posts: 52
Posted: 07/27/2005, 5:49 AM

Yes you can.

You gave no details about the database, but I suggest it's case sensitive or the WHERE criteria selects no rows in the second Execute.

Putting Response.End after the conn.close might reveal an error message that otherwise is not seen because the page reloads and erases it. It will halt script execution at that point, so you can't leave the line in. Just add it, see what happens, then take it back out.
_________________
http://www.gotodon.com/ccbth
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.

MS Access to Web

Convert MS Access to Web.
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.