Looking for a way to connect to MS Access using server-side JavaScript ASP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ublow56
    New Member
    • Sep 2007
    • 1

    Looking for a way to connect to MS Access using server-side JavaScript ASP

    I am trying to create an ASP application using javascript. I found may ways to connect to Ms Access using VBScript, but I can't find any for the Javascript...

    Can someone help me??? I just need the simpliest coding (using ASP server-side javascript) to connect to MS Access. Thank you!!!!
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by ublow56
    I am trying to create an ASP application using javascript. I found may ways to connect to Ms Access using VBScript, but I can't find any for the Javascript...

    Can someone help me??? I just need the simpliest coding (using ASP server-side javascript) to connect to MS Access. Thank you!!!!
    I know I saw this in one of my books. I will try to find it and get back to you.

    Jared

    Comment

    • ilearneditonline
      Recognized Expert New Member
      • Jul 2007
      • 130

      #3
      Here is something from an app i did years ago with JavaScript as the server side code in ASP.

      I can tell you from my personal experience, don't do this with JavaScript. Use VBScript or you will spend hours trying to get anything to work and there are so few people that walked this path.

      [CODE=asp] Response.Expire s = 0;
      Response.Buffer = true;
      var conn = Server.CreateOb ject("ADODB.Con nection");
      var rs = Server.CreateOb ject("ADODB.Rec ordset");
      var dbconn = "Provider=Micro soft.Jet.OLEDB. 4.0; Data Source=d:\\acce ssfile.mdb;";

      //Create a connection to the accessr to obtain a list
      conn.Open (dbconn);
      var sql = "SELECT * FROM table";
      var rs = conn.Execute(sS kills);
      rs.Close();
      rs = null;

      conn.close();
      conn = null;
      [/CODE]

      Comment

      Working...