I'm trying to change the framework of an application I made a while from 3.5 back down to 2.0 as it's not compatible with the new server we put in (we're don't have permission to install 3.5 framework).
So, I went into the project properties and under the Compile tab, changed the project to 2.0. When I tried to publish the project I got a lot of errors and warnings and the publish failed.
In the 3.5 code, I had SQLSelect statement in a Dim which was labeled 'As DataTable'. When switching to 2.0, an error appears on the Dim saying: "Class 'System.Data.DataTable' cannot be indexed because it has no default property". So I simply took DataTable out of the code. Now, when I try to run the project, I get "No default member found for 'DataTable'.
Here's the code:
Function DisplayName(ByVal LoginName)
Dim tempname(2) As String
Dim signon As String
tempname = Split(CheckUser(LoginName), "\")
singon = tempname(1)
Dim rst 'As DataTable
rst = ExecSQLSelect("SELECT given_name, surname FROM ... etc")
If rst.Rows.Count = 0 Then
DisplayName = "Unknown"
'This is where the error is:
DisplayName = rst(0)("giv
View Complete Post