473,395 Members | 1,504 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,395 software developers and data experts.

DataSource for Repeater to convert from System.Data.DataSet

Hi,
i have created a function to open a Databse by OLEDB and fill it into a
System.Data.DataSet-Objekt by oleDBAdapter.Fill-Mehtod..

Now I want to assign this DataSet to a normal Repeater-Control. This
Repeater-Control accepts anything like System.Collections.IEnumerable for a
DataSource.

I have tried to copy the System.Data.Dataset into a DataView-Objekt
(System.Collections.IEnumerable) but I guess there must be some other and
smarter solution to convert the OleDB-Adapter.Foll-Result to fill the the
Repeater-Control will an accepted DataSource.

When I use the OLEDB-Connectin the connectionsting like
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=c:/..." for the
SQL-Connection to open - errors orrcur..

So how can I chance a "objOleDBAdapter.SelectCommand = New
OleDb.OleDbCommand("Select * from tab_X")" like a Repeater-Contol can user
it?

Nov 19 '05 #1
1 4389
Greg:
As I understand it, you have a System.Data.DataSet and you want to bind it
to a Repeater's DataSource property...if so, you might be hitting yourself
:)

simply do

myRepeater.DataSource = myDataSet;
myRepeater.DataBind();

(remove the ; if in VB.Net).

Behind the scenes, the DataSource is actually a DataView...it basically
does:
myRepeater.DataSource = myDataSet.Tables[0].DefaultView;

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Greg Cyrus" <no****@muelltonne.de> wrote in message
news:cu*************@news.t-online.com...
Hi,
i have created a function to open a Databse by OLEDB and fill it into a
System.Data.DataSet-Objekt by oleDBAdapter.Fill-Mehtod..

Now I want to assign this DataSet to a normal Repeater-Control. This
Repeater-Control accepts anything like System.Collections.IEnumerable for a DataSource.

I have tried to copy the System.Data.Dataset into a DataView-Objekt
(System.Collections.IEnumerable) but I guess there must be some other and
smarter solution to convert the OleDB-Adapter.Foll-Result to fill the the
Repeater-Control will an accepted DataSource.

When I use the OLEDB-Connectin the connectionsting like
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=c:/..." for the
SQL-Connection to open - errors orrcur..

So how can I chance a "objOleDBAdapter.SelectCommand = New
OleDb.OleDbCommand("Select * from tab_X")" like a Repeater-Contol can user
it?

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: FatboyCanteen | last post by:
I am using a Repeater control(id=Repeater1) to bind a dataset! However, I failed to work for below Command Dim ds as Dataset = CType(Repeater1.datasource, DataSet) I know it can be done by...
0
by: Mike K | last post by:
Hello, I have run into a strange situation. I have a control in which I am trying to sort the datasource of a repeater and bind the arraylist data back to the repeater. Whenever I do this I...
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
2
by: Marc Robitaille | last post by:
Hello, I set the DataSource property of a DropDownList to as DataSet that is filled from a SQLDataAdapter. The AutoPostBack property of that DropDownList is set to True. When the...
0
by: roni | last post by:
hi. i create dataset that has 5 datatables in it. i set this dataset to repeater.datasource in the ItemDataBound event of the repeater i can access to the first table with : Dim dr As...
0
by: Fred Dag | last post by:
Hi, I have a Repeater that is filled with a PagedDataSource and upon receiving a OnTextChanged event from an <ItemTemplate> Textbox I attempt need to get details from the row in the DataSet such...
1
by: Fred Dag | last post by:
Hi, I am trying to get the DataSet from a Repeater using its DataSource property from an event handler. I am getting Null instead. Should the DataSource persist when the event hadler is...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
2
by: shapper | last post by:
Hello, I created a Repeater at runtime with an AccessDataSource.Everything Works fine! Now I need to use the same repeater but with a DataSource created in my VB.Net code. I created a...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.