|
- Dim rs,sq,pkey
- set conn=createobject("adodb.connection")
- set rs=createobject("adodb.recordset")
- ' 需要安装Oracle客户端
- conn.open "Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=scott;Data Source=orcl;Password=orcl;Extended Properties=;Host=192.168.1.188;Port=1521;Service Name=orcl;"
- sql="SELECT * FROM TAB"
- rs.open sql,conn
- rs.MoveFirst
- Do While rs.Eof<>true
- Msgbox rs.Fields(0)
- rs.MoveNext
- Loop
- rs.close
- set rs=nothing
- conn.close
- set conn=nothing
复制代码
[ 本帖最后由 TIB 于 2010-4-14 11:12 编辑 ] |
|