'----------------------------------------------------' Connect to oracle instance without tnsnames.ora'-----------------------------------------------------Dim strCon: strCon = "Driver={Microsoft ODBC for Oracle}; " & _ "CONNECTSTRING=(DESCRIPTION=" & _ "(ADDRESS=(PROTOCOL=TCP)" & _ "(HOST=10.88.46.10)(PORT=11601))" & _ "(CONNECT_DATA=(SERVICE_NAME=hesit))); uid=apps;pwd=appsapps;" 'Dim strCon: strCon = "Driver={Microsoft ODBC for Oracle}; " & _' "CONNECTSTRING=CCMDBT; uid=readall;pwd=read;"Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")Dim oRs: Set oRs = WScript.CreateObject("ADODB.Recordset")oCon.Open strConSet oRs = oCon.Execute("select * from cper.hr_oa_salary_temp where rownum < 2")While Not oRs.EOF WSCript.Echo oRs.Fields(0).Value oRs.MoveNextWendoCon.CloseSet oRs = NothingSet oCon = Nothing 相关文章: 2021-07-17 2022-12-23 2022-02-20 2021-08-07