By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

DataSource for Repeater to convert from System.Data.DataSet

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.