Can I use a function to return a recordset in classic ASP
Posted on 2006-06-18
I've recently switched from ASP to ASP.NET but I currently working on site that uses ASP.
In .NET I can use a DAL layer class and return a dataset to an object. I'm trying to do the same in ASP.
So, forgetting the classes etc and simplifying the matter I basically just need something like:
rsData = getDataset("SELECT * FROM table")
If Not rsData.Eof Then
'Do my thing...
Public Function getDataset(strSQL)
getDataset = DBConn.Execute(strSQL)
I get "Object doesn't support this property or method: 'Eof'" so I guess I can't return a dataset.