Hi Wayne,
Working with a datagrid is working with a table (basedatalist)
It is very complicated, but doing it for one database table very easy
I write some code in vb.net (C# is almost the same) and with SQL when it it
OleDB change SQL for OleDB
All here written in the message so watch typos
\\\
Dim conn as new SQLconnection(your connectionstring)
dim ds as new dataset
dim da as new SQLdataadapter("myselectstring", conn)
da.fill(ds)
datagrid1.datasource=ds.tables(0)
datagrid1.databind
///
Ready the datagrid with your table will be showed.
(For C# you have to watch the cases also)
I hope this helps?
Cor
"> I am trying to learn to use VS NET and codebehind for asp.net apps and
I've
> run into a problem trying to use a datareader.
>
> I created a new webform and inserted and configured a sqlconnection and I
> inserted a sqlcommand object with the query string. The form has a
datagrid
> object which I want to bind to the returned data. I want to add a
datareader
> to get the actual data but I cannot find a datareader in the toolbox? I
> looked under the data tab and several others.
>
> I previously coded all this in an in-line code format and it works. How do
I
> do this (correctly) in VS NET 2003?
>
> I suspect I am going at this the wrong way. Any advice or pointers are
> appreciated
>
>
|