Mike Yearwood
Toronto, Ontario, Canada
>Hi,
>
>I am testing how I could implement CA as a public object (or referenced by application object) such that it can be used over and over for different SQL commands. For example, when creating reports I need to send to DB a SQL Select and get back the cursor for the report. So my idea is to use the same CA object for all reports.
>
>Here is what I tried:
>
>1. Created CA (DataSourceType'ADO'), set all the necessary ADODB properties. Then I call CursorFill() and get the cursor for the report.
>2. Then I close the cursor (use in ("mycursorname"))
>
>To get cursor for another report I do the following
>1. Set new value of alias for the existing CursorAdapter
>2. Set new value of SelectCmd for the existing CursorAdapter
>3. Call CursorFill().
>I get another cursor with no problem.
>
>My question is, do you see any potential problems with this approach?
>
>TIA.
In OOP terms the design is supposed to be singular, and reused multiple times as instances at runtime. Your way, you will trade space for slowness, by having the overhead of constantly updating the single instance at runtime.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only