G
Guest
Hi,
I am trying to populate a datatable from a sql data reader but I am having
some issues that hopefully somebody can help me out with.
I have added the using System.Data.Common to the top of my form
This is my code
connect = new
System.Data.SqlClient.SqlConnection(connectString);
command = new System.Data.SqlClient.SqlCommand("SELECT *
FROM "+owner+tableName+ " WHERE "+ tableField+ " IN("+inClause+")",connect);
connect.Open();
reader = command.ExecuteReader();
System.Data.Common.DataAdapter da;
da.Fill(dataTbl, reader);
And the error i get is
System.Data.Common.DataAdapter.Fill(System.data.DataTable,System.Data.IDataReader) is inaccessible due to its protection level.
I believe that I need to probably add a reference but I am not sure what to
add.
Any help would be appreciated.
Thanks
I am trying to populate a datatable from a sql data reader but I am having
some issues that hopefully somebody can help me out with.
I have added the using System.Data.Common to the top of my form
This is my code
connect = new
System.Data.SqlClient.SqlConnection(connectString);
command = new System.Data.SqlClient.SqlCommand("SELECT *
FROM "+owner+tableName+ " WHERE "+ tableField+ " IN("+inClause+")",connect);
connect.Open();
reader = command.ExecuteReader();
System.Data.Common.DataAdapter da;
da.Fill(dataTbl, reader);
And the error i get is
System.Data.Common.DataAdapter.Fill(System.data.DataTable,System.Data.IDataReader) is inaccessible due to its protection level.
I believe that I need to probably add a reference but I am not sure what to
add.
Any help would be appreciated.
Thanks