select within an sqladapter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmFzb24gSGFydHNvZQ==?=

    #1

    select within an sqladapter

    is it possible to somehow select certain records inside a data adapter

    for example i fill my adapter with:
    (Select * FROM tbProduct WHERE StyleN = ImageRef AND LNKorDNL='LNK' AND
    ImageType='Silh ouette')

    from there I want to select records only within that fill, adding a WHERE
    statement
    ie:
    select within those records WHERE this='that' or those='these'?
  • Armin Zingler

    #2
    Re: select within an sqladapter

    "Jason Hartsoe" <JasonHartsoe@d iscussions.micr osoft.comschrie b
    is it possible to somehow select certain records inside a data
    adapter for example i fill my adapter with:
    An adapter can not be filled. The adapter is there to read/write data
    from/to a database/dataset.
    (Select * FROM tbProduct WHERE StyleN = ImageRef AND LNKorDNL='LNK'
    AND ImageType='Silh ouette')
    >
    from there I want to select records only within that fill, adding a
    WHERE statement
    ie:
    select within those records WHERE this='that' or those='these'?
    Where do you read the data into? A DataTable has a Select method where
    you can pass a filter expression.

    Otherwise use a supplemented WHERE clause in the SQL to be executed on
    the database.


    Armin

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: select within an sqladapter

      Jason,

      Whatever data you want to retrieve from an DataBase Server you need still at
      the moment a select statement (In Linq this is done behind the scene).

      For dataadapters this needs or is added to the command.Text.

      So a SelectString can be
      "select * in databasetableX WHERE this='that' or those='these'"

      Cor


      "Jason Hartsoe" <JasonHartsoe@d iscussions.micr osoft.comschree f in bericht
      news:D825F957-14ED-4E4F-9052-E5ED75DF458E@mi crosoft.com...
      is it possible to somehow select certain records inside a data adapter
      >
      for example i fill my adapter with:
      (Select * FROM tbProduct WHERE StyleN = ImageRef AND LNKorDNL='LNK' AND
      ImageType='Silh ouette')
      >
      from there I want to select records only within that fill, adding a WHERE
      statement
      ie:
      select within those records WHERE this='that' or those='these'?

      Comment

      Working...