02-17-2011, 09:43 PM
Try this...
Code:
Dim sDataSource
sDataSource = envDBInstance
Dim strConnection, oDbConn, rs, strSQL
strConnection = "Provider=OraOLEDB.Oracle;Data Source=Oracle;User Id=SCOTT;Password=TIGER;"
On Error Resume Next
Set oDbConn = CreateObject("ADODB.Connection")
oDbConn.Open strConnection
Set oResultSet = CreateObject("ADODB.recordset")
oResultSet.open sQuery, oDbConn, 3,3
oResultSet.MoveFirst
Dim arrOutput()
Dim iIter, sDBRow,i
iIter = 0
Do Until oResultSet.EOF
For i = 0 to oResultSet.Fields.Count - 1
print(oResultSet.Fields(i) )
Next
oResultSet.MoveNext
Loop
oResultSet.close
Set oResultSet = Nothing
oDbConn.Close
Set oDbConn = Nothing
GetDBQueryData_Fun = arrOutput