CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Custom INSERT inserting double

Print topic Send  topic

Author Message
miller

Posts: 5
Posted: 03/17/2006, 7:13 AM

I have this code execute on the before show page. It is inserting 2 records into the table, Anyone have any clue why???? This also happens when I use the UPDATE also.

ASP
MS SQL 2000
ASP
CCS 3.0


Thanks


Dim Conn
Set Conn = New clsDBConnection2
Conn.Open
Dim Res
Res = CCExecSQL ("INSERT INTO bla_track VALUES (1,1,1,DATEADD( hh , +3, GETDATE()));", Conn, true)
Conn.Close
Set Conn = Nothing
_________________
Joe Miller
Simpleton
View profile  Send private message
mrachow


Posts: 509
Posted: 03/17/2006, 8:41 AM

Only while seeing your headline.
Do you have specified a Custom Insert?
Then this and your event code would be executed. When you have designed a custom insert and are provinding the shown event code the insert is done twice.
_________________
Best regards,
Michael
View profile  Send private message
Joe
Posted: 03/17/2006, 8:47 AM

I have this on a before show of a page. That is it,
peterr


Posts: 5971
Posted: 03/17/2006, 1:56 PM

Each page can be executed twice in 2 different modes, for example once when a maintenance record is being displayed, then again when the record is being submitted and processed.
I'm not sure if this is the problem, but this would be one reason why "Before Show" could be executed 2 times.

You could try moving your code to the "Before Output" event, which is executed only once, in the page display mode.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Oper


Posts: 1195
Posted: 03/18/2006, 5:30 PM

but refresh will fire the event too.

i will suggest anything else but using before show .................

maybe a Session variable controled or COOKIE.

But i dont know what you looking for......... (user logs??)
maybe there is a nother way if you comment about what you are trying to do.

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
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.