Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 3rd, 2004, 09:46 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in Function returning Recordset


I have written a DLL function which return a Recordset. I'm unable to handle errors in DLL. And also to unable to catch the

error from ASP page.

Plz, give a solution for this problem
1. How to handle errors in DLL which return a Recordset
2. How to catch this Error from ASP page

Below is the code that i have written.....

Public Function GetReportSummary(Optional ByVal intRegId As Integer, Optional ByVal intAgntId As Double) As ADODB.Recordset

Dim cmdObj As ADODB.Command
Dim cmdRs As ADODB.Recordset

On Error GoTo reportError

 With cmdObj
        .ActiveConnection = DSN
        .CommandText = "sp_REQUEST_QUEUE_T_sel"
        .CommandType = adCmdStoredProc
    Set cmdRs = .Execute
 End With

    Set GetReportSummary = cmdRs

    If Err.Number <> 0 Then

    Set GetReportSummary = ??????????????

    How to catch the Errors Here

    End If

End Function

Thanking u in advance for giving the solution


Reply With Quote
  #2 (permalink)  
Old June 3rd, 2004, 11:23 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


One option is to not catch the error in the DLL code. The error would then be displayed in the ASP page. Another is to return an error code value byref as one of the parameters to the method. This value would then be known and could be checked in the ASP page.

In the error handler, set:

Set GetReportSummary = ??????????????


Set GetReportSummary = Nothing

You could then test for the nothing solution when the recordset was returned.

Hope this helps,

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning a recordset John Pennington VB Databases Basics 8 August 18th, 2008 08:37 AM
Snapshot recordset returning only 1 record probitaille Access VBA 2 September 6th, 2006 06:16 PM
Function not returning value civa Access 5 January 17th, 2006 03:44 AM
Stored Proceedure Returning A Recordset rodmcleay C# 3 July 5th, 2004 09:53 PM
Function not returning anything... goatboy Beginning PHP 2 December 1st, 2003 12:34 PM

All times are GMT -4. The time now is 07:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.