Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet and Calculated Field
Message
From
06/05/2009 18:10:58
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01398230
Message ID:
01398235
Views:
54
This message has been marked as a message which has helped to the initial question of the thread.
>If I want to display Total Price as Qty * Price where Qty comes from one table and Price comes from another, what should I do with my DataSet/TableAdapter?

In my framework data class, I have this condition if we are running against SQL Server:
                ' If we are in SQL Server
                If nBackend = 2 Then

                    ' If we have to make the dataset writable
                    If Not lReadOnly Then
                        loColumn = GetColumn(oDataSet)

                        ' Scan thru all the columns and make them writable
                        For lnCounter = 1 To loColumn.Count
                            lcField = loColumn.Item(lnCounter - 1).ColumnName
                            oDataSet.Tables(0).Columns.Item(lcField).ReadOnly = False
                        Next

                    End If

                End If
Basically, if I define loDataProvider.lReadOnly = True, once the SQL is done, this will make all columns of the dataset table to be writable.

Then, you can scan your dataset results and update any necessary rows.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform