ASP include inc
index.asp
<% dim conn dim rs dim sql dim i set conn = getOracleConn() sql = "select .....'" set rs = Server.CreateObject("ADODB.Recordset") set rs = conn.Execute(sql) 'rs.open sql, conn %>
library.inc
<% function getOracleConn() dim conn dim connstr connstr = "Provider=MSDAORA.1;Data Source=TEST;User ID=test;Password=test" set conn = Server.CreateObject("ADODB.Connection") conn.ConnectionString = connstr conn.open set getOracleConn = conn end function %>
留言
張貼留言