I've done a bit of general VB programming in the past but am a newbie to objects.

I'm trying to create a DLL that, when called from a web page, accesses my Access database (I have set up a system DSN), executes a SELECT query, and goes through the recordset performing some action with the data.

It works okay when I test it in a normal VB .exe application, but when I try copying the code into a new ActiveX/DLL application it gives me an error when declaring the recordset.

I start my code with:

Public TempQry As QueryDef
Public dbConnection As Connection
Public ODBCWk As Workspace
Public Rst As Recordset

and when I try to compile/run my code I get an error 'User defined type not defined'. Is there something different about DLLs that means I can't use QueryDef, Recordset etc? What can I use instead to access my db?

Thanks in advance for any help.

Nick