I want to use only one update to do all necessary changes, but I'm confused how to solve this problem:
update master66set mrstats = case when isr.mrstats IN ('Approved','Changed'
View Complete Post
View Complete Post
Hi! I'm creating an application that's supposed to first add a record to table1, and then get the ID from that record to use when adding a record to table2, to be able to associate these two records with eachother.
The user gets to type in some values that goes to table1, and some values that goes to table2, but before the insert statement for table2 is executed i need the ID from the recently added record in table1. Some dude told me to use a trigger for the autopopulate purpose, but does that really work when i also need to save some values that's user input, and when those values doesn't get saved in table1?
Are there any other way to do this or can i send values to a trigger? I'm new to triggers and stored procedures, i don't have any particular knowledge of this, any help is appreciated!
I have a reports table with column report id and and report version. I created a trigger on this table to execute an application to do some processing each time a row is inserted in reports table. I need to pass the new report id execute this application from the trigger. How do I get the report id from the row that was inserted?
I have table A in database A , in table A i have trigger to insert record to database B table A, each update and insert of database A -table A, triiger fire and insert record in database B table A, when i try to update some times asp.net application gives error
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
and then error log says System.Data.SqlClient.SqlException: Database 'database B is being recovered. Waiting until recovery is finished. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean ret
I have a recursive sub that finds a dropdown list and sets up an AsyncPostbackTrigger for an update panel. I have tried calling this sub both from page_init and page_load
If the dropdownlist is within the update panel, eveything works fine. If the dropdown list is not in the updatepanel I get error
A control with ID 'ddlPersonFilter' could not be found for the trigger in UpdatePanel 'up1'. In both cases the sub does find the dropdown list and executes the code to set up the trigger. Thanks for your help.
Private Sub SetUpdatePanelTrigger(ByVal oControl As Control)
For Each ctrl As Control In oControl.Controls
If TypeOf ctrl Is DropDownList Then
If CType(ctrl, DropDownList).ID = "ddlPersonFilter" Then
Dim thisddl As New DropDownList
Dim thistrigger As New AsyncPostBackTrigger
thisddl = ctrl
thistrigger.EventName = "SelectedIndexChanged"
thistrigger.ControlID = thisddl.ID
If ctrl.HasControls Then