Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating link between access database and website

    I have created a website and a search page for my access database - I keep getting the following error message -

    Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /07site/07site/sept4.asp, line 107

    var conn = Server.CreateObject("ADODB.Connection");
    --------------------------------------------------^

    This is what the code on that line says

    </script>
    <script language="JavaScript" src="mm_menu.js"></script>

    <SCRIPT> <!--
    function GetDefinitions() {
    window.open("Definitions.asp", "DW", "width=635,height=450,scrollbars");
    }
    //-->
    </SCRIPT>

    <%
    var conn = Server.CreateObject("ADODB.Connection");
    conn.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath(".") + "//Data//Housing.mdb;");

    //Category
    var rst1 = Server.CreateObject("ADODB.Recordset");
    var CategoryRows = 0;
    var sCategory = "";
    rst1.CursorLocation=Application("CursorLocation.ServerSide");
    rst1.CursorType=Application("CursorType.Keyset");
    rst1.LockType=Application("LockType.ReadOnly");
    var sql = "SELECT ID, Name FROM Category ORDER BY Name";
    rst1.Open (sql, conn);
    CategoryRows = rst1.RecordCount;


    Any suggestions on what to do would be greatly appreciated.

    Thanks

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I guess that is a VBScript problem, not a javascript one. I might move/copy this thread to a proper Forum.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •