471,570 Members | 1,305 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

Data Abstraction Layer SQL/Foxpro

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!

Feb 15 '06 #1
2 1821
Hi,

Take a look at the abstract factory pattern :
http://en.wikipedia.org/wiki/Abstract_factory
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"DKode" <dk****@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
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!

Feb 15 '06 #2
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

Feb 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by 11abacus | last post: by
30 posts views Thread by Luke Wu | last post: by
2 posts views Thread by Eric Cathell | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.