469,277 Members | 1,897 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Connectivity with Access database using JavaScript

Can we do the connectivity in javascript with access?
If yes tell me the process please please !!!!!
Feb 8 '12 #1
2 1488
8,651 Expert Mod 8TB
there might be some possibility with ActiveX in IE, though that is rather JScript than JavaScript.
Feb 8 '12 #2
Hello Aniket, this may be helpful.

Expand|Select|Wrap|Line Numbers
  1. function GetValue(strDate,Value)
  2. {
  3. var strReturnValue = null;
  4. var axoConnection = new ActiveXObject("ADODB.Connection");
  5. var strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/Inetpub/wwwroot/test;Extended Properties = FoxPro 3.0;";
  6. var axoRecordSet = new ActiveXObject("ADODB.Recordset");
  7. var SQL = "SELECT " + Value +" FROM PW030 WHERE L_PNR='" + g_PersonalNumber + "' AND L_DATUM=" + strDate;
  9. axoConnection.Open(strConnection);
  10. axoRecordSet.Open(SQL, axoConnection);
  12. axoRecordSet.Close();
  13. axoConnection.Close();
  15. return strReturnValue;
  16. }
the suggestion is to not use javascript, and instead use a server side technology such as ajax, asp, or php. The reason being that those technologies are server side, so the SQL Server can be housed such that it is not accessible to the outside world and so that the backend technologies being used are not apparent to the client. If you use javascript, the client gains access to the server directly. If they know their user/password information they can log in directly and perform update/delete/select queries directly.

Feb 9 '12 #3

Post your reply

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

Similar topics

1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.