select within an sqladapter

  • Thread starter Thread starter Jason Hartsoe
  • Start date Start date
J

Jason Hartsoe

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='Silhouette')

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'?
 
Jason Hartsoe said:
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='Silhouette')

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
 
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
 
Back
Top