Text 7784, 322 rader
Skriven 2005-10-21 08:45:32 av Rich (1:379/45)
   Kommentar till text 7782 av Randall Parker (1:379/45)
Ärende: Re: GPL and linking and MySQL ADO.NET driver
====================================================
From: "Rich" <@>
This is a multi-part message in MIME format.
------=_NextPart_000_03B5_01C5D61B.CC6920F0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
   I don't know the ASP.NET data controls. If you can use other ADO.NET =
sources you should be able to use the OLE DB ADO.NET provider.
Rich
  "Randall Parker" =
<obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_bold_stuff.comN=
OW> wrote in message news:43587125$1@w3.nls.net...
  Rich,
  Can you take a dataset created by an OLE DB provider and assign it to =
a ASP.Net=20
  object to, say, populate a table or other structure on a web page? You =
can do that=20
  with ASP.Net datasets.
  Rich wrote:
  >    If you would load a class by name and use reflection in Java than =
do=20
  > the same with ADO.NET.  You can use this model if you prefer.
  > =20
  >    If you prefer connection strings you can use the OLE DB provider.
  > =20
  > Rich
  > =20
  >=20
  >     "Randall Parker"
  >     =
<obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_bold_stuff.comN=
OW
  >     =
<mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_bold_stu=
ff.comNOW>>
  >     wrote in message news:4355f08e$1@w3.nls.net...
  >     Paul,
  >=20
  >     I'm amazed at just how much ADO.Net seems a step backward from =
an
  >     object oriented
  >     standpoint.
  >=20
  >     In Java with JDBC one had to instantiate just a single class
  >     somewhere that was for a
  >     specific driver. With ADO.Net one has to instantiate a number of
  >     different
  >     driver-specific classes for a driver.  I'm still learning this =
but
  >     with MySQL as an
  >     example I know 3 you can to refer to so far:
  >=20
  >              MySql.Data.MySqlClient.MySqlConnection dbConn;
  >              MySql.Data.MySqlClient.MySqlCommand dbCmd;
  >              MySql.Data.MySqlClient.MySqlDataAdapter dbAdapter;
  >=20
  >               dbConn =3D new MySqlConnection(MyConnString);
  >               dbConn.Open();
  >               dbCmd =3D new MySql.Data.MySqlClient.MySqlCommand();
  >               dbAdapter =3D new =
MySql.Data.MySqlClient.MySqlDataAdapter();
  >=20
  >     Now, for some of them you can assign the instantiations to what =
are
  >     basically base
  >     interface types. But when you instantiate them you have to refer =
to
  >     their names.
  >=20
  >     It would make a lot more sense if off the connection object you
  >     could get a command
  >     object and an adapter object (and some others). Then you =
wouldn't
  >     need to refer to
  >     the other driver-specific class names once you'd instantiated =
the
  >     connection object.
  >=20
  >     I said on an MS forum that this seemed dumb and one of the MVPs =
said
  >     he didn't see a
  >     way around the way it works.
  >=20
  >     However, with Java you can load the class name at start-up and =
do
  >     reflection or
  >     something else to instantiate a class name. Perhaps with C# and
  >     ADO.Net you might be
  >     able to load the class name as a string and somehow instantiate =
it
  >     and use interface
  >     types to declare variables? Not sure.
  >=20
  >=20
  >     Paul Ranson wrote:
  >      > That seems somewhat retarded. What's the point of abstraction =
if
  >     you have to
  >      > know what you're going to be using at that level?
  >      >
  >      > Does the MySQL code not implement an OleDB provider? I'd have
  >     expected to
  >      > just be able to name the data source but it's not my field.
  >      >
  >      > Paul
  >      >
  >      > "Randall Parker"
  >      >
  >     =
<obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_bold_stuff.comN=
OW
  >     =
<mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_bold_stu=
ff.comNOW>>
  >=20
  >      > wrote in message news:435525bb$1@w3.nls.net...
  >      >
  >      >>Paul,
  >      >>
  >      >>You actually have to refer to the MySQL driver by name in =
your
  >     source
  >      >>code. In C#:
  >      >>
  >      >>using MySql.Data.MySqlClient;
------=_NextPart_000_03B5_01C5D61B.CC6920F0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>   I don't know the ASP.NET =
data=20
controls. If you can use other ADO.NET sources you should be able to use = the
OLE=20
DB ADO.NET provider.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Rich</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"Randall Parker" <<A=20
  =
href=3D"mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_b=
old_stuff.comNOW">obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_wit=
h_bold_stuff.comNOW</A>>=20
  wrote in message <A=20
  =
href=3D"news:43587125$1@w3.nls.net">news:43587125$1@w3.nls.net</A>...</DI=
V>Rich,<BR><BR>Can=20
  you take a dataset created by an OLE DB provider and assign it to a =
ASP.Net=20
  <BR>object to, say, populate a table or other structure on a web page? =
You can=20
  do that <BR>with ASP.Net datasets.<BR><BR>Rich=20
  wrote:<BR>>    If you would load a class by name and =
use=20
  reflection in Java than do <BR>> the same with ADO.NET.  You =
can use=20
  this model if you prefer.<BR>>  <BR>>    If =
you=20
  prefer connection strings you can use the OLE DB =
provider.<BR>> =20
  <BR>> Rich<BR>>  <BR>> <BR>>     =
"Randall=20
  Parker"<BR>>     <<A=20
  =
href=3D"mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_b=
old_stuff.comNOW">obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_wit=
h_bold_stuff.comNOW</A><BR>>    =20
  <<A=20
  =
href=3D"mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_b=
old_stuff.comNOW">mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpun=
dit_with_bold_stuff.comNOW</A>>><BR>>    =20
  wrote in message <A=20
  =
href=3D"news:4355f08e$1@w3.nls.net">news:4355f08e$1@w3.nls.net</A>...<BR>=
>    =20
  Paul,<BR>> <BR>>     I'm amazed at just how =
much=20
  ADO.Net seems a step backward from an<BR>>     =
object=20
  oriented<BR>>     standpoint.<BR>>=20
  <BR>>     In Java with JDBC one had to =
instantiate just=20
  a single class<BR>>     somewhere that was for=20
  a<BR>>     specific driver. With ADO.Net one =
has to=20
  instantiate a number of<BR>>    =20
  different<BR>>     driver-specific classes for =
a=20
  driver.  I'm still learning this =
but<BR>>     with=20
  MySQL as an<BR>>     example I know 3 you can =
to refer=20
  to so far:<BR>>=20
  =
<BR>>           =
;  =20
  MySql.Data.MySqlClient.MySqlConnection=20
  =
dbConn;<BR>>         &nbs=
p;   =20
  MySql.Data.MySqlClient.MySqlCommand=20
  =
dbCmd;<BR>>          =
;   =20
  MySql.Data.MySqlClient.MySqlDataAdapter dbAdapter;<BR>>=20
  =
<BR>>           =
;   =20
  dbConn =3D new=20
  =
MySqlConnection(MyConnString);<BR>>      =
;        =20
  =
dbConn.Open();<BR>>        &nb=
sp;     =20
  dbCmd =3D new=20
  =
MySql.Data.MySqlClient.MySqlCommand();<BR>>    &nb=
sp;         =20
  dbAdapter =3D new MySql.Data.MySqlClient.MySqlDataAdapter();<BR>>=20
  <BR>>     Now, for some of them you can assign =
the=20
  instantiations to what are<BR>>     basically=20
  base<BR>>     interface types. But when you =
instantiate=20
  them you have to refer to<BR>>     their =
names.<BR>>=20
  <BR>>     It would make a lot more sense if off =
the=20
  connection object you<BR>>     could get a=20
  command<BR>>     object and an adapter object =
(and some=20
  others). Then you wouldn't<BR>>     need to =
refer=20
  to<BR>>     the other driver-specific class =
names once=20
  you'd instantiated the<BR>>     connection=20
  object.<BR>> <BR>>     I said on an MS forum =
that=20
  this seemed dumb and one of the MVPs =
said<BR>>     he=20
  didn't see a<BR>>     way around the way it=20
  works.<BR>> <BR>>     However, with Java you =
can=20
  load the class name at start-up and do<BR>>     =
  reflection or<BR>>     something else to =
instantiate a=20
  class name. Perhaps with C# and<BR>>     =
ADO.Net you=20
  might be<BR>>     able to load the class name =
as a=20
  string and somehow instantiate it<BR>>     and =
use=20
  interface<BR>>     types to declare variables? =
Not=20
  sure.<BR>> <BR>> <BR>>     Paul Ranson=20
  wrote:<BR>>      > That seems somewhat=20
  retarded. What's the point of abstraction =
if<BR>>    =20
  you have to<BR>>      > know what =
you're going=20
  to be using at that level?<BR>>     =20
  ><BR>>      > Does the MySQL code =
not=20
  implement an OleDB provider? I'd have<BR>>     =
expected=20
  to<BR>>      > just be able to name the =
data=20
  source but it's not my field.<BR>>     =20
  ><BR>>      >=20
  Paul<BR>>     =20
  ><BR>>      > "Randall=20
  Parker"<BR>>     =20
  ><BR>>     <<A=20
  =
href=3D"mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_b=
old_stuff.comNOW">obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_wit=
h_bold_stuff.comNOW</A><BR>>    =20
  <<A=20
  =
href=3D"mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpundit_with_b=
old_stuff.comNOW">mailto:obfuscate_techieSPAMpundit_now@STOPfutureSPAMpun=
dit_with_bold_stuff.comNOW</A>>><BR>>=20
  <BR>>      > wrote in message <A=20
  =
href=3D"news:435525bb$1@w3.nls.net">news:435525bb$1@w3.nls.net</A>...<BR>=
>     =20
  ><BR>>     =20
  >>Paul,<BR>>     =20
  >><BR>>      >>You actually =
have to=20
  refer to the MySQL driver by name in =
your<BR>>    =20
  source<BR>>      >>code. In=20
  C#:<BR>>     =20
  >><BR>>      >>using=20
  MySql.Data.MySqlClient;</BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_03B5_01C5D61B.CC6920F0--
--- BBBS/NT v4.01 Flag-5
 * Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
 |