Home All Groups Group Topic Archive Search About

Data access layer for SQL Server & MS Access

Author
8 Dec 2006 6:00 AM
sanders_mike_newsgroups
Hi

I have a web app that needs to be able to use either SQL Server or MS
Access - depending upon the installation.  I want to avoid having
unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
OLEDBDatareader in lots of parts of the app)

Could I not just avoid this and use OLEDB for both database types?

Whats the best way - OLEDB or to create some kind of data access layer
that returns recordsets.

Thanks
Mike

Author
8 Dec 2006 6:09 AM
RobinS
Yes. (You can use OLEDB for both database types.)

Robin S.
------------------
<sanders_mike_newsgro***@yahoo.com> wrote in message
Show quoteHide quote
news:1165557636.003154.70940@f1g2000cwa.googlegroups.com...
> Hi
>
> I have a web app that needs to be able to use either SQL Server or MS
> Access - depending upon the installation.  I want to avoid having
> unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
> OLEDBDatareader in lots of parts of the app)
>
> Could I not just avoid this and use OLEDB for both database types?
>
> Whats the best way - OLEDB or to create some kind of data access layer
> that returns recordsets.
>
> Thanks
> Mike
>
Author
8 Dec 2006 7:13 AM
sanders_mike_newsgroups
OK, thanks for that.


RobinS wrote:
Show quoteHide quote
> Yes. (You can use OLEDB for both database types.)
>
> Robin S.
> ------------------
> <sanders_mike_newsgro***@yahoo.com> wrote in message
> news:1165557636.003154.70940@f1g2000cwa.googlegroups.com...
> > Hi
> >
> > I have a web app that needs to be able to use either SQL Server or MS
> > Access - depending upon the installation.  I want to avoid having
> > unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
> > OLEDBDatareader in lots of parts of the app)
> >
> > Could I not just avoid this and use OLEDB for both database types?
> >
> > Whats the best way - OLEDB or to create some kind of data access layer
> > that returns recordsets.
> >
> > Thanks
> > Mike
> >
Author
8 Dec 2006 12:08 PM
Rotsey
the perforamnce of using OLEDB with SQL is pretty poor on all reports.


<sanders_mike_newsgro***@yahoo.com> wrote in message
Show quoteHide quote
news:1165561986.428411.324020@j72g2000cwa.googlegroups.com...
> OK, thanks for that.
>
>
> RobinS wrote:
>> Yes. (You can use OLEDB for both database types.)
>>
>> Robin S.
>> ------------------
>> <sanders_mike_newsgro***@yahoo.com> wrote in message
>> news:1165557636.003154.70940@f1g2000cwa.googlegroups.com...
>> > Hi
>> >
>> > I have a web app that needs to be able to use either SQL Server or MS
>> > Access - depending upon the installation.  I want to avoid having
>> > unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
>> > OLEDBDatareader in lots of parts of the app)
>> >
>> > Could I not just avoid this and use OLEDB for both database types?
>> >
>> > Whats the best way - OLEDB or to create some kind of data access layer
>> > that returns recordsets.
>> >
>> > Thanks
>> > Mike
>> >
>
Author
8 Dec 2006 2:15 PM
rowe_newsgroups
To be honost I've never had any performance trouble using OleDb with
SQL server - it all depends on what you're doing and how often. The OP
should do some speed checks between the two (SQLClient and OleDb) and
see if the difference is enough to warrant using OleDb for Access, and
SQLClient for SQL Server or just using OleDb for both.

Also, if I'm not mistaking, isn't the OleDb class just a wrapper for
"classic" ADO? If so you wouldn't gain much (if anything) by using ADO
instead of ADO.Net

Thanks,

Seth Rowe


Rotsey wrote:
Show quoteHide quote
> the perforamnce of using OLEDB with SQL is pretty poor on all reports.
>
>
> <sanders_mike_newsgro***@yahoo.com> wrote in message
> news:1165561986.428411.324020@j72g2000cwa.googlegroups.com...
> > OK, thanks for that.
> >
> >
> > RobinS wrote:
> >> Yes. (You can use OLEDB for both database types.)
> >>
> >> Robin S.
> >> ------------------
> >> <sanders_mike_newsgro***@yahoo.com> wrote in message
> >> news:1165557636.003154.70940@f1g2000cwa.googlegroups.com...
> >> > Hi
> >> >
> >> > I have a web app that needs to be able to use either SQL Server or MS
> >> > Access - depending upon the installation.  I want to avoid having
> >> > unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
> >> > OLEDBDatareader in lots of parts of the app)
> >> >
> >> > Could I not just avoid this and use OLEDB for both database types?
> >> >
> >> > Whats the best way - OLEDB or to create some kind of data access layer
> >> > that returns recordsets.
> >> >
> >> > Thanks
> >> > Mike
> >> >
> >
Author
8 Dec 2006 7:33 AM
Master Programmer
Dont listen to this guy, he just posts messages around these groups
trying to cause trouble and give people the wrong information.

You need to create a custom "Data Access Class" that obscures the type
of database that you are connecting to. OLEDB is way too slow (100
times slower than a native SQL Server connection).

To be honest with the limitations of the .net data tools (IE: no
generic dataReader etc) - you are probably better to keep life simple.
I don't mean to be blasphemous but just import ADO (COM) and use that -
at least it has MoveNext.

The Grand Master
"Visual Basic 6.0 Jihad"


sanders_mike_newsgro***@yahoo.com wrote:
Show quoteHide quote
> Hi
>
> I have a web app that needs to be able to use either SQL Server or MS
> Access - depending upon the installation.  I want to avoid having
> unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
> OLEDBDatareader in lots of parts of the app)
>
> Could I not just avoid this and use OLEDB for both database types?
>
> Whats the best way - OLEDB or to create some kind of data access layer
> that returns recordsets.
>
> Thanks
> Mike
Author
8 Dec 2006 7:50 AM
RobinS
We both know that's not true. You are the one who is flaming people,
as anyone can tell by your history. You could at least maintain
a modicum of class and not tell lies about other people.

Robin S.
-----------------
Show quoteHide quote
"Master Programmer" <master_program***@outgun.com> wrote in message
news:1165563227.558862.152350@79g2000cws.googlegroups.com...
> Dont listen to this guy, he just posts messages around these groups
> trying to cause trouble and give people the wrong information.
>
> You need to create a custom "Data Access Class" that obscures the type
> of database that you are connecting to. OLEDB is way too slow (100
> times slower than a native SQL Server connection).
>
> To be honest with the limitations of the .net data tools (IE: no
> generic dataReader etc) - you are probably better to keep life simple.
> I don't mean to be blasphemous but just import ADO (COM) and use that -
> at least it has MoveNext.
>
> The Grand Master
> "Visual Basic 6.0 Jihad"
>
>
> sanders_mike_newsgro***@yahoo.com wrote:
>> Hi
>>
>> I have a web app that needs to be able to use either SQL Server or MS
>> Access - depending upon the installation.  I want to avoid having
>> unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
>> OLEDBDatareader in lots of parts of the app)
>>
>> Could I not just avoid this and use OLEDB for both database types?
>>
>> Whats the best way - OLEDB or to create some kind of data access layer
>> that returns recordsets.
>>
>> Thanks
>> Mike
>
Author
8 Dec 2006 2:46 PM
BK
We use a custom class we wrote in house that puts all our data access
in a wrapper.  That way, the whole shop uses the same syntax for data
access regardless of the backend.  We use it for access to Oracle, SQL
Server (2000 and 2005), DB2, and even MySql when we want a disconnected
database.  The Enterprise Library Data Access is nice and we gave some
consideration to it before committing to "roll our own", but the
support for DB2 was lacking (unless you purchase additional product
from IBM) and there was no support for MySql.  It's worth looking at
any way.

As for "Master Programmer"'s comments.... that's a bit like the pot
calling the kettle black.  He's one of 2 that are constantly trying to
stir up trouble, disregard his comments.  For a quick sampling of his
typical childish rants, look at some of these posts (there are plent
others):

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/76b98908a46c4235/ed1a354a0360e19e#ed1a354a0360e19e
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/e38d7018d85872e1/6533cc9c33358562#6533cc9c33358562
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/2ce097ad4cf0b8a9/5dd479d77fe43e53?lnk=st&q=&rnum=31#5dd479d77fe43e53
http://groups.google.com/group/microsoft.public.excel/browse_frm/thread/aad27a7884a4a7/453a4a8dcaf35681?lnk=st&q=&rnum=43#453a4a8dcaf35681