467,222 Members | 1,459 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,222 developers. It's quick & easy.

DataAccessBlock, DataView and conflict SQLReader

I am seeing how the DataView ( dVue1) control works with this code - but
something must be wrong since I am getting no rows.

dVue1.DataSource = SqlHelper.ExecuteReader(strDefConnTxt, CommandType.Text,
strSql);
dVue1.Refresh();
int rc =dVue1.DisplayedRowCount(false);
Then I added this line :
SqlDataReader myReader;
& it would no longer compile -
What should I do ?

Error 1 The type 'System.Data.SqlClient.SqlDataReader' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.Data.dll' and
'c:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies\System.Data.SqlClie nt.dll' C:\Documents and
Settings\wattsa\My Documents\Visual Studio 2005\Projects\SQL Tables
Viewer\SQL Tables Viewer\TableViewer.cs 49 13 SQL Tables Viewer
Thanks !
--
Andrew
Nov 17 '05 #1
  • viewed: 1680
Share:
2 Replies
Andrew,

Are you referring to the DataGrid (the DataView helps provide client
side filtering of data tables), rather?

Also, is this an ASP.NET page? Only data grids in ASP.NET can use
DataReaders as data sources. If this is a windows forms grid, then you will
want to return a data set/data table and bind to that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"andrewcw" <an******@acw.com> wrote in message
news:3B**********************************@microsof t.com...
I am seeing how the DataView ( dVue1) control works with this code - but
something must be wrong since I am getting no rows.

dVue1.DataSource = SqlHelper.ExecuteReader(strDefConnTxt,
CommandType.Text,
strSql);
dVue1.Refresh();
int rc =dVue1.DisplayedRowCount(false);
Then I added this line :
SqlDataReader myReader;
& it would no longer compile -
What should I do ?

Error 1 The type 'System.Data.SqlClient.SqlDataReader' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.Data.dll' and
'c:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies\System.Data.SqlClie nt.dll' C:\Documents and
Settings\wattsa\My Documents\Visual Studio 2005\Projects\SQL Tables
Viewer\SQL Tables Viewer\TableViewer.cs 49 13 SQL Tables Viewer
Thanks !
--
Andrew

Nov 17 '05 #2
Thanks yes I was using WINFORMS and I can get a DATASET back with the MDAB.
But I thought the ocntrol I was using was a WINform control. Thanks for the
tip - I'll keep working at it until something is visible !
--
Andrew
"Nicholas Paldino [.NET/C# MVP]" wrote:
Andrew,

Are you referring to the DataGrid (the DataView helps provide client
side filtering of data tables), rather?

Also, is this an ASP.NET page? Only data grids in ASP.NET can use
DataReaders as data sources. If this is a windows forms grid, then you will
want to return a data set/data table and bind to that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"andrewcw" <an******@acw.com> wrote in message
news:3B**********************************@microsof t.com...
I am seeing how the DataView ( dVue1) control works with this code - but
something must be wrong since I am getting no rows.

dVue1.DataSource = SqlHelper.ExecuteReader(strDefConnTxt,
CommandType.Text,
strSql);
dVue1.Refresh();
int rc =dVue1.DisplayedRowCount(false);
Then I added this line :
SqlDataReader myReader;
& it would no longer compile -
What should I do ?

Error 1 The type 'System.Data.SqlClient.SqlDataReader' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.Data.dll' and
'c:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies\System.Data.SqlClie nt.dll' C:\Documents and
Settings\wattsa\My Documents\Visual Studio 2005\Projects\SQL Tables
Viewer\SQL Tables Viewer\TableViewer.cs 49 13 SQL Tables Viewer
Thanks !
--
Andrew


Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Agnes | last post: by
3 posts views Thread by Saurabh Prabhu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.