By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,702 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,702 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this Question
Share on Google+
2 Replies


jhardman
Expert 2.5K+
P: 3,405
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
Expert 100+
P: 130
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.