Connecting an ASP web page to SQL Server

  • Thread starter Thread starter matt.raffel
  • Start date Start date
M

matt.raffel

Im running XP Pro with SQL Server 2000 SP3 installed on my local
machine.

I've created a webpage that has a sqlConnection, sqlDataApdapter, a
dataset, and a datagrid. I've gone though all the "wizard setup".
But the data in my table doesnt show up in the datagrid when I run the
page.

Its clear the dataset "saw" the sql server and the table because in
the dev window in VS.net the datagrid shows the columns of the table I
would expect it to show.

I am at a total loss as to why. I dont see any exceptions thrown in
the output window. But no data in the grid and no grid even. I dont
even understand where to go from here.

Any ideas, any help, would be appreciated.
 
if you write out your dataset to see if your even getting your data.
that's like this
datasetName.WriteToXML(Server.MapPath("data.xml"))
then go look at the xml file and see if it has any data in it. If it does,
then you might not be binding your grid correctly.

if you could show some code and it will be easier to see what the problem is
or what your missing.
 
Im running XP Pro with SQL Server 2000 SP3 installed on my local
machine.

I've created a webpage that has a sqlConnection, sqlDataApdapter, a
dataset, and a datagrid. I've gone though all the "wizard setup".
But the data in my table doesnt show up in the datagrid when I run the
page.

Its clear the dataset "saw" the sql server and the table because in
the dev window in VS.net the datagrid shows the columns of the table I
would expect it to show.

I am at a total loss as to why. I dont see any exceptions thrown in
the output window. But no data in the grid and no grid even. I dont
even understand where to go from here.

Any ideas, any help, would be appreciated.


i assume that you set DataSource for this data grid.
Then you must call DataBind() method of this data grid.
 
Back
Top