OdbcDataReader

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pagates

    OdbcDataReader

    Hi All,

    Just looking for a confirmation on something (in VS 2003).

    Can an OdbcDataReader be populated only by a ExecuteReader on an OdbcCommand?

    Thanks,
    pagates
  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: OdbcDataReader

    Hi,

    An OdbcDataReader is indeed returned by OdbcCommand.Exe cuteReader

    It does not have any public constructor, so yes, the class cannot be created
    using "new"


    What is the problem with that?

    cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation



    "pagates" <pagates@discus sions.microsoft .com> wrote in message
    news:C8D1DD5A-B4D6-4903-877F-DBE26BD23A54@mi crosoft.com...[color=blue]
    > Hi All,
    >
    > Just looking for a confirmation on something (in VS 2003).
    >
    > Can an OdbcDataReader be populated only by a ExecuteReader on an
    > OdbcCommand?
    >
    > Thanks,
    > pagates[/color]


    Comment

    • pagates

      #3
      Re: OdbcDataReader

      Hi Ignacio,

      No real "problem." I am using a project that gets data either through Odbc,
      or through another mechanism (a property allows the user to choose which
      method, per a requirement in our software). There is a wrapper around the
      various communication mechanisms, and I wanted to make it as generic as
      possible.

      Since I can do what I need with a DataTable, there is no need to pursue this
      further. I was just curious at this point.

      Thanks,
      Paul

      "Ignacio Machin ( .NET/ C# MVP )" wrote:
      [color=blue]
      > Hi,
      >
      > An OdbcDataReader is indeed returned by OdbcCommand.Exe cuteReader
      >
      > It does not have any public constructor, so yes, the class cannot be created
      > using "new"
      >
      >
      > What is the problem with that?
      >
      > cheers,
      >
      > --
      > Ignacio Machin,
      > ignacio.machin AT dot.state.fl.us
      > Florida Department Of Transportation
      >
      >
      >
      > "pagates" <pagates@discus sions.microsoft .com> wrote in message
      > news:C8D1DD5A-B4D6-4903-877F-DBE26BD23A54@mi crosoft.com...[color=green]
      > > Hi All,
      > >
      > > Just looking for a confirmation on something (in VS 2003).
      > >
      > > Can an OdbcDataReader be populated only by a ExecuteReader on an
      > > OdbcCommand?
      > >
      > > Thanks,
      > > pagates[/color]
      >
      >
      >[/color]

      Comment

      Working...