FrancineTaylor
asked on
"Cannot implicitly convert type 'object' to 'System.Data.DataColumn'
This is the code:
DataSet ds = GetDataSet(psTable, psSQL);
DataColumn dc = ds.Tables[0].Rows[0][piCol
The second line gives the error in the title. I'm converting my code from VB.NET to C#.NET and I'm obviously not getting the syntax quite right.
ds.Tables[0].Rows[0][piCol
If you want to get the datacolumn you should use
ds.Tables[0].Columns[0]
the problem is not casting problem. More than it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you could try something like
--------------
DataColumn dc = New DataColumn[] {ds.Tables[0].Columns["piC
--------------
hope this helps a bit
bruintje