Why won't this function return data?

R

rotor

Hello, I'm using Access 2002. I have a function that is designed to retrieve data from an Oracle DB. The connection is solid and the SQL string has been tested. The function successfully connects to Oracle, executes, and runs without errors.

The problem is no records are retrieved. The resulting recordset even contains the column names, proving everything else is okay, just no data. Could someone please fix this code and show me what is wrong?

Function DAOOracleRecordset(argSQL As String) As DAO.Recordse

'REQUIRED REFERENCE: MICROSOFT DAO 3.6 OBJECT LIBRAR
'RETURN AN ORACLE QUERY IN A RECORDSE

Dim strConnect As Strin
Dim ws As DAO.Workspac
Dim db As DAO.Databas
Dim rs As DAO.Recordse

strConnect = DAOConnection("FINANCIALS"

Set ws = CreateWorkspace("", "", "", dbUseODBC
Set db = ws.OpenDatabase("", , , strConnect
Set rs = db.OpenRecordset(argSQL, dbOpenDynaset
rs.MoveLas

Set DAOOracleRecordset = r

End Functio

THANKS VERY MUCH IN ADVANCE!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top