ASP 中通过OLEDB访问 Oracle 的代码

来源:互联网 发布:python运维开发 编辑:程序博客网 时间:2024/05/16 01:35

ASP 中通过OLEDB访问 Oracle 的代码

<%
set conn=server.createobject("adodb.connection")
dns="Provider=OraOLEDB.Oracle.1;Persist Security Info=True;User ID=ay_user;Password=ay;Data Source=zhf"
conn.Open dns
%>

<%
SQL="select * from test1"
set rs=conn.execute(SQL)
%>

<table border=1>
<%do while (not rs.eof)%>
<tr>
<td width=100><%=rs("姓名")%></font></td>
<td width=100><%=rs("性别")%></font></td>
</tr>
<%rs.movenext
loop%>
</table>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

原创粉丝点击