CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Execute(SQL) doesn’t error nor updates the field

Print topic Send  topic

Author Message
Peko
Posted: 08/22/2004, 2:55 PM

Dear all,

I’m new in the CodeCharge Studio’s community and not very much acquainted to the environment yet. I’m trying to implement a very simple application for exercise purpose only, which is supposed to update some registers of a server’s database (MySQL) as the user fill in some fields and press a submit button in the form. The submit button triggers a BeforeExecuteUpdate event, which copies a row from one table to another within the database. My code follows bellow:

Dim SQL
Dim ErrorMessage
Dim dbconnection



SQL = "INSERT INTO logdocexternos_item (" &_
"docexterno_item_id, " & _
"codigo, " & _
"designacao, " & _
"edicao, " & _
"edicaodata, " & _
"estado, " & _
"utilizcriacao, " & _
"datacriacao, " & _
"docexterno_id" & _
") VALUES (" & _
"(SELECT docexterno_item_id FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT codigo FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT designacao FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT edicao FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT edicaodata FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT estado FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT utilizcriacao FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT datacriacao FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
"(SELECT docexterno_id FROM docexternos_item WHERE docexterno_item_id= " & CCTOSQL(CCGetFromGet("docexterno_item_id",0),ccsinteger) & ")," &_
");"

Set dbconnection = New clsDBMySQL_DocExternos
dbconnection.Open
dbconnection.Execute(SQL)
ErrorMessage=CCProcessError(dbconnection)
dbconnection.Close
Set dbconnection = Nothing
On Error Goto 0



The problem is that . Any suggestion is more than welcome.

Looking forward to finding a light in the end of the tunnel.

Cheers,
Peko

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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