Return ADODB.Recordset type from .NET to Classic ASP
I have a DAL that I want to return an ADODB.recordset when executed from a classic asp. The object is exposed as a com object and I have a complete dal workin but I am not sure how to return an object that is a recordset that .net can use.
Any help would be aprcitated. Thank you!
You need to add a reference to the COM base ADODB in your Web Project along with a a reference to your DAL component. You should then be able to use the component much like you were in ASP.
That said you should read this KB:-
I would strongly recommend you consider porting your DAL to a .NET assembly first.
I think you both for your feedback, but what I was looking to do was probably misunderstood, due to a poorly written question. I found a link to a page that did exactly what I was looking for.
What I have is a DAL that is an Assembly that I wanted to expose to ASP but to do so, to prevent from having to rewrite to much code I needed to first find a way to return a type of a recordset ONLY when called from Classic ASP apps. This would happen VIA a COM exposed method call that would make the call to the DAL and convert the returned .NET DataSet as a VB RecordSet.
Here is the link that I found that made this possible. http://www.codeproject.com/KB/database/ADOConversion.aspx
Once Again, Thank you for your help and your input, and I apologize for such a poorly written question.
Ditto what Anthony said, if you can avoid this by all means do. If your DAL is a very generic DAL you can probally write one in .net or use someone elses like Application Block and spend less time then dealing with issues that might crop up.