Any idea why this overload won't work?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • damiensawyer@yahoo.com.au

    Any idea why this overload won't work?

    Hi,

    I've recently moved up to Framework 3.5. For some reason, a method
    signature on dataAdaptor.fil l that used to work has stopped.

    DataTable oDT = new DataTable();
    SqlDataAdapter oDA = new SqlDataAdapter( SQLLoadString,
    clsGlobalFuncti ons.oSQLConnect ion);
    oDA.Fill(oDT, "Movies"); //Error

    "The best overloaded method match for
    'System.Data.Co mmon.DataAdapte r.Fill(System.D ata.DataTable,
    System.Data.IDa taReader)' has some invalid arguments"

    The strange thing is, in the Intellisense constructor (3 of 5) says
    that the method can take (Dataset dataset, string srcTable).

    I'm confused.

    Thanks in advance for any help,


    Damien
  • damiensawyer@yahoo.com.au

    #2
    Re: Any idea why this overload won't work?

    Sorry everyone, please ignore.

    DataTable oDT should be a Dataset.

    ... that'll teach me to stay up coding past midnight....


    On Jun 23, 12:48 pm, "damiensaw...@y ahoo.com.au"
    <damiensaw...@y ahoo.com.auwrot e:
    Hi,
    >
    I've recently moved up to Framework 3.5. For some reason, a method
    signature on dataAdaptor.fil l that used to work has stopped.
    >
              DataTable oDT = new DataTable();
                SqlDataAdapter oDA = new SqlDataAdapter( SQLLoadString,
    clsGlobalFuncti ons.oSQLConnect ion);
                oDA.Fill(oDT, "Movies"); //Error
    >
    "The best overloaded method match for
    'System.Data.Co mmon.DataAdapte r.Fill(System.D ata.DataTable,
    System.Data.IDa taReader)' has some invalid arguments"
    >
    The strange thing is, in the Intellisense constructor (3 of 5) says
    that the method can take (Dataset dataset, string srcTable).
    >
    I'm confused.
    >
    Thanks in advance for any help,
    >
    Damien

    Comment

    Working...