본문 바로가기
소프트웨어/ASP / JS / CSS / C#

JSCRIPT DBOpen

by 씨디맨 2007. 11. 28.
320x100

<%@ LANGUAGE="JSCRIPT" %>
<%
 var objDBCon;

 function DBOpen()
 {
  var strDBConnect ="Provider=SQLOLEDB;Network Library=dbmssocn;Data Source=127.0.0.1;Initial Catalog=TESTDB;user ID=test;password=test;";
  objDBCon = Server.CreateObject("ADODB.CONNECTION");
  objDBCon.Open(strDBConnect);
 }

 function DBClose()
 {
  objDBCon.Close();
  objDBCon = null;
 }

%>

반응형

댓글