This topic is locked

Redirect after add with details

1/25/2011 11:46:34 AM
ASPRunnerPro General questions
T
Tim author

Hello,
I have an add page with details. When I save this page I'd like to execute an insert into another table, then redirect to another page. When I don't have the redirect code in the event, the rest works fine: master record is saved, details records are saved, insert code works and insert records into another table. When I put the redirect in there, the master record is saved, the insert into other table works, but the details don't get created and I am not redirected. The add page just sits there like nothing happened.
Here is the code I've added to the "After record added" event of the Add page:
sql = "INSERT INTO [CompletedSurveys] ([Staff],[SurveyID],[HomeDepartment],[Completed],[StaffVerified],[SupervisorVerified]) select StaffID, '" & values("SurveyID") & "', HomeDepartment, '0', '0', '0' from vStaff where EmploymentStatus = 'Active' and StaffID in (Select Staff from vStaffDepartments where Department = '" & values("ForDepartment") & "')"
dbConnection.Execute sql

sql = ""
response.redirect "CreateQuestions_edit.asp?editid1=" & values("SurveyID")
ASPR version 6.3, build 7113. Do I have something wrong here?
Thanks,

Tim

Sergey Kornilov admin 1/26/2011

Tim,
I would suggest to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

T
Tim author 1/26/2011

Thanks for the resonse. When I try to upload to demo account I get this error:
Unable to creae script for:

dbo.vDepartmentRoles
Error executing query
sp_helptext 'dbo.vDepartmentRoles'

IDispatch error #3092

There is no text for object 'dbo.vDepartmentRoles'.
It seems to be failing on my database views, which are SQL server views that pull data from other databases. Is there something I can do to resolve?
Thanks,

Tim

Sergey Kornilov admin 1/26/2011

You can try to reproduce this issue on smaller project and post it to demo account. Not really sure if there is any other way to handle this if it involves multiple databases.

T
Tim author 1/27/2011

I pulled the tables from the other database into this one and then it uploaded fine. Look for email sent to support.
Thanks,

Tim

A
admin 1/27/2011

Hi,
I am also having the same issue, please update me too, how to resolve.
Sami

Sergey Kornilov admin 1/27/2011

Sami,
you need to follow the same Demo Account route.