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

 Custom insert on load

Print topic Send  topic

Author Message
pr3mium

Posts: 31
Posted: 02/09/2004, 5:43 AM

I'd like to make an admin interface, so that if the right user opens the page (I have built NT authentication), it adds a row to a specified table with some information. I made a header page, where I put "before show" event with a code like that:
  
Dim SQL  
Dim Connection  
  
  SQL = "INSERT INTO Personal_admin (ntname,scala_arv) "&_   
        "VALUES ('" & getNTname & "','" & scala_arv & "')"  
  Set Connection = New clsDBdata  
  Connection.Open  
  Connection.Execute(SQL)  
  ErrorMessage = CCProcessError(Connection)  
  Connection.Close  
  Set Connection = Nothing  
  On Error Goto 0  
Well, there are no error messages and page is viewed correctly. The variables have their values and everything should be right, but the insert action doesn't take place.
Is it because I'm using "Before show" event? I have no forms in the header, just one label with some HTML content.
Any ideas, how could I define an insert action on page load?
View profile  Send private message
peterr


Posts: 5971
Posted: 02/09/2004, 2:36 PM

The "Before Show" event should work OK. Another option is to try "After Initialize" event of the page.
However, what you may really need is to debug your issue and see if any error message is being returned when executing your query. After the "ErrorMessage" line add this code to display the error message:
Response.Write ErrorMesage  
Response.End

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
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.

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.