Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with row
Message
From
24/09/2010 21:23:51
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Dealing with row
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01482679
Message ID:
01482679
Views:
108
In this code:
                        Dim loRowMichel As DataRow = Nothing

                        ' Assign the row to the field
                        oRow(lcTable)("Field") = loRow

                        System.Windows.Forms.MessageBox.Show(loRow.ToString)
                        System.Windows.Forms.MessageBox.Show(oRow(lcTable)("Field").ToString)

                        loRowMichel = oRow(lcTable)("Field")
I assign a datarow, with is loRow, in the first line to the global oRow property. After that, if I show the type of loRow and the type of oRow(lcTable)("Field"), it really shows that both have a data type of a data row. However, the next line will fail. The application says that it cannot cast object of type 'System.String' to type 'System.Data.DataRow'.
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
Next
Reply
Map
View

Click here to load this message in the networking platform