Get schema and gridview problem

Hello experts,

I found the following article for getting a schema for an access database;-

http://aspalliance.com/542

I need to get the schema for a DB2 database, and I'm wondering if it will follow the same principle as the example in the link above. So I have done the following;-

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
private void Page_Load(object sender, EventArgs e)
{
System.Data.OleDb.OleDbConnection OleDbConnection1 =
new System.Data.OleDb.OleDbConnection("Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=XXX.XXX.XXX.XXX;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default Schema=Schema;User ID=MyUser;Password=MyPW";  
OleDbConnection1.Open();
System.Data.DataTable DataTable1 = OleDbConnection1.GetSchema();
OleDbConnection1.Close();
GridView1.DataSource = DataTable1;
GridView1.DataBind();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Database Schema</title>
</head>
<body>
      <form id="form1" runat="server">
      <div>
            <asp:gridview ID="GridView1" runat="server">
            </asp:gridview>  
      </div>
      </form>
</body>
</html>


So my question is twofold,
1. Will this work, if not, is there actually a method for getting an IBM DB2 database schema

2. I get the following error at the moment when I run the above code;-
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type System.Web.UI.WebControls.gridview from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

Source Error:
Line 22: <form id="form1" runat="server">
Line 23: <div>
Line 24: <asp:gridview ID="GridView1" runat="server">
Line 25: </asp:gridview>  
Line 26: </div>

Many Thanks.
LVL 4
claracruzAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SystemExpertCommented:
Hi,

very first statement
"Retrieving Access database schema with ASP.NET 2.0 is actually very simple."

It's in .net 2.0

and it shows the error for 1.0.5000.0

try for convert or something else

Thanks

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.