-
FIXED - Re: Err Line Number Function?
The problem end up being a ADO Versioning conflict. Downloaded the component
checker and saw various version from 2.5 to 2.7. Had the client reinstall
2.7 sp1 and the problem is gone.
thanks
Michael
"michael" <mmayfield_NOSPAM@houston.rr.com> wrote:
>
>I do not think that the error is occuring in one of the DB Classes with
the
>following design. However, any insight to resolve the problem would be much
>appreciated.
>
>The app is currently using Access as the backend. SQL Server is planned
in
>the future so I designed the DB class to only return ADODB.Recordsets, ErrorObjects
>& ADODBErrorObjects. I designed it so that the one function that creates
>the DB class in the application can be simply changed from Set DB = New
DBScheduler
>to Set DB = CreateObject(Class, Server) for DCOM use. When DB class returns
>any of those objects listed above, I evaluate the return values with these
>2 functions.
>
>'Code that used the ValidateRecordset Function
>' Set rs = ValidateRecordset(db.GetActivity(ActivityID), sProcedure)
>Public Function ValidateRecordset(oRs As Object, ProcedureName As String)
>As ADODB.Recordset
> If TypeOf oRs Is ADODB.Recordset Then
> Set ValidateRecordset = oRs
> Else
> WriteError ProcedureName, oRs
> End If
>End Function
>
>'Code that used the ValidateIsError Function
>' If not ValidateIsError(rsHeader, rsDetail), sProcedure) Then
>Public Function ValidateIsError(oError As Object, ProcedureName As String)
>As Boolean
> If Not oError Is Nothing Then
> ValidateIsError = True
> WriteError ProcedureName, oError
> End If
>End Function
>
>This ValidateRecordset is looking for an ADODB.recordset to be returned.
>If not it will be either the ErrorObject or the ADODB ErrorObject. The ValidateIsError
>function is looking for nothing to be returned. I use this when I do not
>need to only update the database without a return value or I have multiple
>recordset that need to be updated which are passed byVal to one of the DB
>class's functions.
>
>Thanks
>Michael
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks