Hi guys,
I use GetRows to simulate the disconnected recordset, and loop the array to display the values.
However, I use hardcode values (1, 2,...) for the array indices to refer to the fields.
Is it possible to get the column numbers passing the field name as shown in the code below with asp.net?
...I use classic ASP.
Dim First_Name__Ordinal as Int32 = reader.GetOrdinal("FirstName")
Dim Last_Name__Ordinal as Int32 = reader.GetOrdinal("LastName")
Dim Hire_Date__Ordinal as Int32 = reader.GetOrdinal("HireDate")
Dim EmployeeID__Ordinal as Int32 = reader.GetOrdinal("EmployeeID")
Thanks for your help,
neualex
I use GetRows to simulate the disconnected recordset, and loop the array to display the values.
However, I use hardcode values (1, 2,...) for the array indices to refer to the fields.
Is it possible to get the column numbers passing the field name as shown in the code below with asp.net?
...I use classic ASP.
Dim First_Name__Ordinal as Int32 = reader.GetOrdinal("FirstName")
Dim Last_Name__Ordinal as Int32 = reader.GetOrdinal("LastName")
Dim Hire_Date__Ordinal as Int32 = reader.GetOrdinal("HireDate")
Dim EmployeeID__Ordinal as Int32 = reader.GetOrdinal("EmployeeID")
Thanks for your help,
neualex