469,271 Members | 1,563 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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!!!!
Sep 10 '07 #1
2 1913
jhardman
3,406 Expert 2GB
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
Sep 11 '07 #2
ilearneditonline
130 Expert 100+
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.

Expand|Select|Wrap|Line Numbers
  1.  Response.Expires = 0;
  2. Response.Buffer = true; 
  3. var conn = Server.CreateObject("ADODB.Connection");
  4. var rs = Server.CreateObject("ADODB.Recordset");
  5. var dbconn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\\accessfile.mdb;";
  6.  
  7. //Create a connection to the accessr to obtain a list
  8. conn.Open (dbconn);
  9. var sql = "SELECT * FROM table";
  10. var rs = conn.Execute(sSkills);
  11. rs.Close();
  12. rs = null;
  13.  
  14. conn.close();
  15. conn = null;
  16.  
Sep 11 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Kona | last post: by
11 posts views Thread by Marcus | last post: by
3 posts views Thread by Fabian Knopf | last post: by
3 posts views Thread by LamSoft | last post: by
3 posts views Thread by =?Utf-8?B?Ulc=?= | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.