locked
Connecting to Access database RRS feed

  • Question

  • User-433493107 posted

    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>

     

     

    Thursday, April 17, 2014 6:22 PM

All replies

  • User1208776063 posted

    when I open the page in the browser, I get Service Unavailable error.

    How are you opening this page in browser? Is it from a hosted website such as http://mysite/somepage.aspx?

    AFAIK, you will get this error when IIS web server is stopped. If you are using Visual Studio to debug this web page, make sure you see an icon for IISExpress in the taskbar. Otherwise, hit F5 to start debugging from Visual Studio which should resolve this issue.  

    Thursday, April 17, 2014 10:18 PM
  • User-433493107 posted

    I'm viewing form http://www.evmguru.com/Javita/Untitled_1.aspx. I get this error:

    Server Application Unavailable

    The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

    Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

    Hitting F5 does nothing, not even F12. I'm in Los Angeles and I'm trying to find someone I could jsut sit with either live or through conference to walk me through this. I just don't feel like dealing with another learning curve

    Friday, April 18, 2014 8:26 PM
  • User-1199946673 posted

    and now I'm stepping up to Visual Studio/expressions

    You better use Visual Web Developer Express

    http://www.asp.net/vwd

    Friday, April 18, 2014 8:36 PM
  • User-1454326058 posted

    Hi cfreema7,

    According to you description, you are using the FrontPage and host the website on the GoDaddy.

    We can’t reproduce that scene and your issue is not supported here.

    I suggest that you could post it to the necessary forum for efficient response. (E.g. GoDaddy support)

    There is a link that may benefit you:

    http://support.godaddy.com/help/article/2498/what-is-an-access-database

    Thanks

    Best Regards

    Tuesday, April 22, 2014 3:37 AM
  • User-1199946673 posted

    Starain chen - MSFT

    According to you description, you are using the FrontPage

    NO

    cfreema7

    I'm stepping up to Visual Studio/expressions from FrontPage.

    Also

    I suggest that you could post it to the necessary forum for efficient response. (E.g. GoDaddy support)

    When I read the internet, the last thing you can say about GoDaddy is that they give "efficient" response!!!!

    Tuesday, April 22, 2014 3:54 AM
  • User-433493107 posted

    Uh...don't know why you sent this link? I know absolutely what an Access database is, been running with this combination for years.

    The problem is that in using Visual Studio Express, I follow the steps to create a page connected to an Access database, and I get nothing but thtis error. I posted the coding from the page, and I was hoping someone could look through the code and realize that I forgot to add "...insert your code comment here..." or that I need to make sure I "...insert connection comment here..."

    Thanks

     

    Wednesday, April 23, 2014 7:23 PM
  • User-1454326058 posted

    Hi cfreema7,

    Do you get that error if you view that page through the VS directly? (Right click the page=>View in Browser)

    If so, could you reproduce that scene in a new project?

    Thanks

    Best Regards

    Wednesday, April 23, 2014 9:43 PM
  • User-433493107 posted

    Well, after a system failure by GoDaddy, they tried to blame it on FrontPage extension failure but it was their hosting plan, I found out a couple of things:

    1. First, the failure may be due to VS Express running .net v4, and GoDaddy hosting plan only supports up to .net v3.5
    2. Then I found a super simple ASP tutorial on http://www.webwiz.co.uk/kb/asp-tutorials that allowed me to create an ASP connection
    3. I created new code for the pages using ASP and it runs just fine
      1.  <%
        'Dimension variables
        Dim adoCon         'Holds the Database Connection Object
        Dim rsGuestbook    'Holds the recordset for the records in the database
        Dim strSQL         'Holds the SQL query to query the database

         
        Set adoCon = Server.CreateObject("ADODB.Connection")
        adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\javita\javita_force.mdb")

         'Set an active connection to the Connection object using DSN connection
        'adoCon.Open "DSN=guestbook"
        Set rsJavita = Server.CreateObject("ADODB.Recordset")
        strSQL = "SELECT * FROM Javita_Team WHERE Javita_Customer = -1 ORDER BY F_Name ASC"
        rsJavita.Open strSQL, adoCon

        %>

    4. But now, this makes me realize that I need to synch up the hosting platform with my development so that I can effectively use .net instead of handcoding all of this

    So again, going back to my original issue, is there something in my code that indicates .net v4 instead of v3 or v3.5?

    Friday, April 25, 2014 3:23 PM
  • User-1454326058 posted

    Hi cfreema7,

    Do you try to change the target framework of that application to .NET Framework 3.5 via VS?

    Thanks

    Best Regards

    Wednesday, April 30, 2014 2:44 AM