The reason why thought of this is because i am experiencing a foreign key constraint error.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FKColumn_aspnet_Users". The conflict occurred in database "database", table "dbo.aspnet_Users", column 'UserName'. The statement has been terminated.
I understand why this is happening. what is the best way around this.?
masterdineen
Member
22 Points
215 Posts
Sql Proc to execute after 2 secs on Button Click
Nov 04, 2012 09:25 PM|LINK
Hello there.
i am using VB
Is there a way i can have a SQL Stored Proc execute 2 seconds once the user clicks a button.?
Regards
Rob
CPrakash82
All-Star
18142 Points
2830 Posts
Re: Sql Proc to execute after 2 secs on Button Click
Nov 05, 2012 03:15 AM|LINK
Just add the below statement in your SP, or sleep call in .net before SP call.
WAITFOR DELAY '00:00:02'
masterdineen
Member
22 Points
215 Posts
Re: Sql Proc to execute after 2 secs on Button Click
Nov 05, 2012 08:11 PM|LINK
My idea of delaying a stored proc has not worked.
The reason why thought of this is because i am experiencing a foreign key constraint error.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FKColumn_aspnet_Users". The conflict occurred in database "database", table "dbo.aspnet_Users", column 'UserName'. The statement has been terminated.
I understand why this is happening. what is the best way around this.?
masterdineen
Member
22 Points
215 Posts
Re: Sql Proc to execute after 2 secs on Button Click
Nov 05, 2012 08:12 PM|LINK
Also for more information i am using a create user wizard on my webpage.
masterdineen
Member
22 Points
215 Posts
Re: Sql Proc to execute after 2 secs on Button Click
Nov 07, 2012 12:11 PM|LINK
Ive worked this one out now.
all i did was create an After Insert Trigger on aspnet_users table to update my related table afterwards.