473,513 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1879
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3117
by: 11abacus | last post by:
Hi, Just wondering if any of you has thought about or is working on a payment gateway abstraction layer (PEAR-style)? I'm interested on developing that or at least start a discussion about it. The package would provide a framework for all types of online (and offline?) payment transactions.
0
2897
by: me | last post by:
I've posted this in the microsoft news group but just noticed the comp newsgroups. What's the difference anyways? This one is a tricky one so I'm interested in seeing what all you gurus have to say. I'm trying to put a resume into a database. There are only three reports (see below). I suspect that the best structure for a resume...
6
5723
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project modified that is to upgrade a big, more than 100,000 lines DOS based program developed by FoxPro 2.x to .NET platform. The design is as previous and...
5
2135
by: David Winter | last post by:
I am looking for a "WYSIWYG" style, browser-based editor for (X)HTML content. It should (at least) run under Windows, preferably in Mozilla/Firefox, but IE would be OK, too. Now I know there are dozens of these beasts. I am looking for one with an "abstraction layer". What I mean by this is that the formatting applied to the code and its...
30
2184
by: Luke Wu | last post by:
Hello, >From spending some time in clc, I've come to realize that C's model of the CPU can be totally different from the atual CPU. Is it safe to say that almost nothing can be gleaned about physical CPU behaviour from C level behaviour. For example:
2
1806
by: Eric Cathell | last post by:
I am using dOOdads as my persistence layer. I have a business object Person that sits in a Project called DOMAIN I have 2 dOOdads in a project called BLL. one is _Person and is declared MustInherit the other is Person and is my concrete class. My main goal of BLL.Person is to protect custom methods and properties against regeneration.
3
5070
by: S. Lorétan | last post by:
Hi guys, I'm coding an application connected to a database. I have some clients that use this program with 2 or 3 computers, and I use MsSQL Express for them. But if the client needs more computers to be connected to the database, I have to use a standard MsSQL. No problem with that, but I want to be able to switch from a database provider...
17
46458
Motoma
by: Motoma | last post by:
This article is cross posted from my personal blog. You can find the original article, in all its splendor, at http://motomastyle.com/creating-a-mysql-data-abstraction-layer-in-php/. Introduction: The goal of this tutorial is to design a Data Abstraction Layer (DAL) in PHP, that will allow us to ignore the intricacies of MySQL and focus our...
2
2234
bilibytes
by: bilibytes | last post by:
Hi there, I am wondering what are the advantages of having a database abstraction layer like the one explained Here (in Devshed) Don't you get more efficient queries writing them down in SQL? As far as i can understand, i just see an advantage whenever the underlying database were to change (and even then, SQL isn't the same on each...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.