If you insert a record, the Details View automatically populates the collection with values from the bound columns and calls the Insert method.
Do you have a way that I can track the @original Order ID and @Order Total parameter's value before the update occurs?
What would the Table's column type have to be in SQL Server for this to work?
Can this article help me with this issue: I have a procedure in Oracle, that create a temporary table with output data.
I need from my application execute this procedure and than get data by SELECT query.
I have a Transactions table which stores individual items that the user selects for purchase (item name, item price, order ID, etc) I have an Orders table which stores values for the Order (account name, order total, etc) Here is my Sql Data Source as defined in the page: " Insert Command="INSERT INTO [tbl Orders] ([Order Date], [Order Total], [Order Account], [Order Cost Centre]) VALUES (@Order Date, @Order Total, @Order Account, @Order Cost Centre); SELECT @Order New ID = SCOPE_IDENTITY()" Select Command="SELECT * FROM [tbl Orders]" Update Command="UPDATE [tbl Orders] SET [Order Date] = @Order Date, [Order Total] = @Order Total, [Order Account] = @Order Account, [Order Cost Centre] = @Order Cost Centre WHERE [Order ID] = @original_Order ID AND [Order Date] = @original_Order Date AND [Order Total] = @original_Order Total AND [Order Account] = @original_Order Account AND [Order Cost Centre] = @original_Order Cost Centre" Old Values Parameter Format String="original_" oninserting="Sql Data Source2_Inserting" oninserted="Sql Data Source2_Inserted" onupdated="Sql Data Source2_Updated" onupdating="Sql Data Source2_Updating" //Update Order Table with Total of Order //Sql Data Source2.
Update(); The page doesn't error out, but the Update to Order Total in the Orders Db doesn't update. Or, tap into the Updating event, and add the new value to the event argument collection of values.
Finally, after data is inserted by the Details View control into the database, the event handler is called to handle the Inserted event, the value of the primary key of the inserted row is displayed, and the Data Bind method of the Grid View control is called explicitly to refresh the data.
The following code example demonstrates how to display and update data retrieved from an ODBC database in a Grid View control.
I have the page number to be updated stored in a variable called 'mypagenum', how would I write an update parameter using that value.