Data Abstraction Layer SQL/Foxpro

D

DKode

Hello,

I am creating a data layer that will handle SQL(SQLClient) and Visual
Foxpro (OleDb). The way I am thinking about creating it is create a
base class that handles setting of connectionstring and accessors for
IDbAdapter, IDbCommand, IDbConnection etc..

then in the derived classes I handle casting the connection/commands to
the proper type and return results.

I was browsing through microsofts examples on their data layer, which
is one class that uses an enum to determine the proper casting type and
returns values.

Is there any benefit to doing it the way microsoft has on their
patterns and practices site?

I would imagine that my method would be more extensible since
functionality is seperated into different derived classes.

thanks!
 
D

DKode

I just got done reading a book on design patterns, and reviewed the
factory pattern briefly.

I must admit, I am still having a hard time determining when to use
certain patterns and where. That article helps.

Thank you!

Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top