Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Connecting to Access database

$
0
0

First off, let me state, I'm not a developer, nor a true programmer, I just create a little websites here and there, and now I'm stepping up to Visual Studio/expressions from FrontPage.

With that, I'm trying to break away from FrontPage database wizard, and connect to my access database on my website hosted by GoDaddy. I follow the instructions:

1. Open aspx page on my hosted site through the explorer.

2. Select, drag and configure  AccessDataSource

3. Select, drag and configure GridView

The test query works fine, shows the data. The gridview works fine, and show the data columns. But when I open the page in the browser, I get Service Unavailable error.

What is wrong? The code is below:

      <form id="form1" runat="server">
    <asp:AccessDataSource ID="AccessDataSource1" runat="server"
        DataFile="~/fpdb/KSEA Inventory Data.accdb"
        SelectCommand="SELECT [Material], [From_Convention_ID], [From_Convention], [From_Conv_Start] FROM [Conv_Direct_Transfer]">
    </asp:AccessDataSource>
   
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
        DataSourceID="AccessDataSource1" EnableModelValidation="True"
        ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="Material" HeaderText="Material"
                SortExpression="Material" />
            <asp:BoundField DataField="From_Convention_ID" HeaderText="From_Convention_ID"
                SortExpression="From_Convention_ID" />
            <asp:BoundField DataField="From_Convention" HeaderText="From_Convention"
                SortExpression="From_Convention" />
            <asp:BoundField DataField="From_Conv_Start" HeaderText="From_Conv_Start"
                SortExpression="From_Conv_Start" />
        </Columns>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
    </asp:GridView>
   
    </form>

 

 


Viewing all articles
Browse latest Browse all 3509

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>