database connection for javascript

Results 1 to 2 of 2

Thread: database connection for javascript

  1. #1
    Join Date
    Dec 1969

    Default database connection for javascript

    Does anyone know what commands to use to connect to a database like sql server if your scripting language is Javascript?<BR><BR><BR>I know the way to do it in vbscript is:<BR>strConn ="DRIVER={SQL Server};SERVER=devsql0;UID=diasp;PWD=diasp;DATABAS E=DATAINTEGRATION;"<BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en strConn<BR><BR><BR>But what&#039s the way to do it in Javascript?<BR>thanks

  2. #2
    Richard A. Lowe Guest

    Default RE: database connection for javascript

    this should work, note that var is just Dim in JScript, but not necessary (you could implicitly create them), and no Set statement is necessary:<BR><BR>var strConn ="DRIVER={SQL Server};SERVER=devsql0;UID=diasp;PWD=diasp;DATABAS E=DATAINTEGRATION;";<BR>var Conn = Server.CreateObject("ADODB.Connection");<BR>Conn.O pen(strConn);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts