Link to home
Start Free TrialLog in
Avatar of gsfc
gsfcFlag for United States of America

asked on

SQL and SharePoint "Could not instantiate" error

I am attempting to display data from a SQL 2000 database on a SPS2003 server with SP2 installed.
I am using SP Designer 2007 to create a GridView and a SqlDataSource and saving the page to my SPS 2003 server as aspx using VB.

When I navigate to the page I get the following error...
---Start of Error---
Could not instantiate control asp:SqlDataSource

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily disable Web Parts or remove personal settings. For more information, contact your site administrator.
---End of Error---

the code on my page is as follows
---Start of Code---
<head>
<meta http-equiv="Content-Language" content="en-us">
</head>

<form id="form1" runat="server">
      <asp:SqlDataSource runat="server" ID="Wigs" ConnectionString="Data Source=gsfcnet;Initial Catalog=GSFC_Wigs;Integrated Security=True" ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [WIGS_Table]">
      </asp:SqlDataSource>
      <asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="Wigs" ForeColor="#333333" CellPadding="4" GridLines="None">
            <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
            <Columns>
                  <asp:boundfield DataField="Department" SortExpression="Department" HeaderText="Department">
                  </asp:boundfield>
                  <asp:boundfield DataField="WIG Number" SortExpression="WIG Number" HeaderText="WIG Number">
                  </asp:boundfield>
                  <asp:boundfield DataField="Details" SortExpression="Details" HeaderText="Details">
                  </asp:boundfield>
                  <asp:boundfield DataField="Owner" SortExpression="Owner" HeaderText="Owner">
                  </asp:boundfield>
            </Columns>
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <EditRowStyle BackColor="#999999" />
            <SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" Font-Bold="True" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
      </asp:GridView>
</form>
---End of Code---

I am VERY new to coding and SharePoint, any idea on how I can get this to work?
Thanks in advance for all your help.

Chris Baker
Avatar of a0k0a7
a0k0a7
Flag of United States of America image

I think there's an error on your connection string, please verify with this link

http://connectionstrings.com/?carrier=sqlserver
ASKER CERTIFIED SOLUTION
Avatar of Ted Bouskill
Ted Bouskill
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial