I have this vbscript code in my current project:

<%
      Set cn = Server.CreateObject("adodb.connection")
      
      cn.ConnectionString = "FILE NAME=c:\Config.udl")
      cn.Open 
      .
      .
      .
%>

How do you translate this in Javascript?
I want to be uniform in my codes for the module I'm working on at the moment. I've already started scripting using Javascript and I seem to have no other choice when it comes to this part of my module. Thanks in advance

AFAIK, client side, browser embedded Javascript can't connect to a database. Use a server side language like PHP, Perl etc. for this purpose. Assuming the VBScript here runs on the client machine, the above code will work only on a Windows box and that too when the file Config.udl is preset at the given location.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.