On 6/21/05, Joel Cochran <jrc@xxxxxxxxxx> wrote:
> > date: Tue, 21 Jun 2005 09:39:39 -0400
> > from: Steve Richter <stephenrichter@xxxxxxxxx>
> > subject: Re: Java vs .NET was: RPGIII compiler vs Visual Basic
> >
> > The advantage of using sql server in .net code is you get better
> > dataset functionality.  As I understand it, to change from sqlserver
> > to mysql in .NET code you have to actually change your code - use the
> > MySqlCommand class in place of the SqlCommand class.  You can code
> > initially using the generic whatever classes, but you lose some data
> > set functionality.
> 
> A DataSet is a DataSet is a DataSet.  All the Managed Providers can
> return a DataSet (using DataAdapter.Fill()) or you can read through with
> a DataReader.  From a .NET perspective, what is easier using SQLServer
> are the tools built into VS.NET.
> 
> Yes, to use the MySQL Managed Provider, or any others, you have to
> specify which one you wish to use.  JDBC has this as well in that you
> have to specify which driver you want to use.  The difference is that in
> JDBC the driver is a string: in .NET you have to actually code for the
> particular class.
> 
> To get over this hurdle, I wrote an interface called IDBAccess.  I then
> implemented a wrapper class for each Database type that implements the
> IDBAccess methods and properties.  In each of these classes I handle
> whatever vagaries there might be:  using Integrated Security in
> SqlServer, handling the different Exception properites that are reported
> by each type, etc.  To cap it all off, I then wrote a DBAccessManager
> class that wraps all of these wrappers.  Now when I want to create a
> database connection, it looks something like this:
> 
> DBAccessManager db = new DBAccessManager(
>        SWallTech.DB.DatabaseTypes.iSeriesDB2 ,
>        datasource ,
>        database ,
>        userID ,
>        password ,
>        securityType );

looks great Joel, but it is too much code!  The strength of .NET is
its simplicity and consistency.  A shop pays an extra $20 per month. 
In return its team of $70 per hour contract programmers get their work
done sooner which saves the enterprise a lot of money.

( I was going to suggest you derive your data access classes from
SqlCommand and SqlConnection.  But I see that MS has sealed those and
many other .NET classes.  Which means they cant be derived.  Which
makes it harder to use MySQL in .NET code! )

-Steve


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.