Get schema and gridview problem

Posted on 2006-04-24
Last Modified: 2013-11-19
Hello experts,

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

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#" %>
<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";  
System.Data.DataTable DataTable1 = OleDbConnection1.GetSchema();
GridView1.DataSource = DataTable1;
<html xmlns="" >
<head runat="server">
<title>Database Schema</title>
      <form id="form1" runat="server">
            <asp:gridview ID="GridView1" runat="server">

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.
Question by:claracruz
    1 Comment
    LVL 10

    Accepted Solution


    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


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now