COM STRATEGIES 
Author Message
 COM STRATEGIES

Hi everyone

This is my first post so please be kind

I have some questions about coding strategies, please read each one and give
me your opinion

1) About reusable functions

I have many functions reusables like: parse functions, date functions,
strings function, etc.
so what do you thing is better:

  A) make a module called "modGeneralFunctions.bas" and add this module in
each project at the start
  B) create a dll  called  CUtilities and make method and use it in each
project? and if is YES your answer, how to declare

 - Dim oUtilities as CUtilities
   Set oUtilities = new CUtilities

   OR?

 - Public oUtilities as New Cutilities

 Consider that these functions maybe will be called in many places
 And  consider that these project maybe will be implemented in a multiuser
invorment

2) About Error Handler....the eternal function

I have a function with a parameter called lngErrNumber, and with this value
I look for the description in a database in MS Access called
dbErrorHanlder.mdb

I have a table with the table of error numbers and error description
provided by microsoft
and some user defined errors

What do you think about this technique?

From where can I update this table of error values?

How to get an update table of error number and descriptions of SQL Server?

Note: These solutions are for VB 6, but please send me your opinion thinking
in vb.net too

Thanks Alotsisimo :D

            Fernando Capquequi



Sun, 24 Oct 2004 00:14:07 GMT  
 COM STRATEGIES

Quote:
> I have many functions reusables like: parse functions, date functions,
> strings function, etc.
> so what do you thing is better:

>   A) make a module called "modGeneralFunctions.bas" and add this module in
> each project at the start
>   B) create a dll  called  CUtilities and make method and use it in each

Neither. Create a DLL with a GlobalMultiuse class with your function
library. No declaration is required...it acts as an extension to VB. Note
that this is for function libraries only, not classes that store data.

Quote:
> 2) About Error Handler....the eternal function

> I have a function with a parameter called lngErrNumber, and with this
value
> I look for the description in a database in MS Access called
> dbErrorHanlder.mdb

> I have a table with the table of error numbers and error description
> provided by microsoft
> and some user defined errors

> What do you think about this technique?

Sounds like overkill to me, but if it works for you....

--
Frank Carr

http://www15.brinkster.com/vbnotebook



Wed, 27 Oct 2004 12:16:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. COM Instance Counter Strategy

2. Strategies for accessing instances of COM objects

3. RS.MoveLast and RS.RecordCount strategy

4. Password strategy -

5. Inventory Strategy

6. Need advise on Strategy for operation on a network

7. Audit strategies and syncronising clocks in VBA

8. Strategy for User Defined fields

9. Suggest primary key allocation strategies?

10. Review strategy for adding Word VBA supplementary functions

11. Best Strategy for VBA automation in Project 2000 WITH CODE

 

 
Powered by phpBB® Forum Software