473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
2 1820
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RPI_alum | last post by:
I've been experiencing some frustrating behavior that I believe may be a MS bug in the Framework. Has anyone else experienced this, know a better way to resolve it, or if it is an actual MS bug ...
2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
0
by: Chris Morse | last post by:
Hi, Following is a function I wrote to export the rows of an arbitrary table. It's not complete yet, in that it currently does not output to a file (it uses Debug.WriteLine() at the moment) and...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
3
by: Agnes | last post by:
drBranchForm = sqldatareader For Each drBranch In dtUserBranch Do While drBranchForm.Read .......... Problem (A) Loop Next I found that the datarreader only loop onces , ?? How can I make it...
5
by: c676228 | last post by:
Hi all, I am stuck with this problem. the code is like this: Dim sqlreader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection) ...
3
by: Saurabh Prabhu | last post by:
Hi there, I am using a SQL reader to read data from a table. Here is how I use it. SqlDataReader lobj_Table = SqlHelper.ExecuteReader(ConnectionObject,CommandType.Text,lstr_SQL); Now I need...
14
lotus18
by: lotus18 | last post by:
Hello all I have these records on my Day Table for my complete database table please click here 1. M 2. T 3. W 4. TH 5. F 6. S
0
by: Pravin Pujari | last post by:
Hi All, I am using .net framework 1.1 and c#. I have one problem regarding dataview. I have one dataview to which sorting may be applied or may not be applied. I have one UI component where I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.