I've created on my dataset a tableadapter with the next select command
select count(*) as cuenta from table1.
But, on the runtime, I need to compose different selects with variable number of clauses. I'd like to use the same tableadapter but I'm not able to change the select command.
This is a little example of my problem:
Original select command for the dataadapter "EXISTE" on DataSource"ds":
select 1 as cuenta(*)
On designer I drop the dataadapter to create an instance on my form: "EXISTE1"
Code:
EXISTE1.Adapter.SelectCommand = new System.Data.SqlClient.SqlCommand("select 2255 as cuenta");
EXISTE1.Fill(ds.EXISTE);
But it always returns me "1" as result, not 2255.
How can I run the other command without creating a new Fill function?
Best Regards