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

 record from table is deleted

Print topic Send  topic

Author Message
mramirez18

Posts: 56
Posted: 06/05/2006, 6:54 AM

Can someone tell me why when I submit a record.

dbo_users id is 122 and dbo_reports is 121. I am using the following code.

Function dbo_users_Button_Insert_OnClick() 'dbo_users_Button_Insert_OnClick @25-D275D92F
Dim SQL
Dim RecordSet
Dim GetLastInsKey

'Custom Code @99-73254650
' SQL="INSERT INTO dbo_reports (userid)"
' DBPoacm.Execute(SQL)

'Get User ID
'This method compatible with all databases (unsafe when multiple users insert records at the same time)
'Use your own method for your database.
GetLastInsKey = CCDLookup("max(userid)", "dbo_users", "",DBpoacm)
SQL = "INSERT INTO dbo_reports (userid) " _
& "VALUES (" & DBPoacm.ToSQL(GetLastInsKey,ccsInteger) _
& ")"
DBPoacm.Execute(SQL)

Redirect = "EditableGridAddButton.asp?userid=" & GetLastInsKey
'End Custom Code


Then when I submit record using editable grid, to add reports the userid is deleted.
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.