Walaa wrote:
The best option is to select the date field using a dynamicList.
(check the manual's section: "Using the generated code -> Adapter/SelfServicing -> Using TypedViews, TypedLists and dynamic lists -> Using Dynamic Lists")
A dynamicList is a dataTable, so you can use it directly, or you can extract values from it into an array.
My query is:
select Date from Pubs From Pubdate
where DatePart('yyyy',Date) = "2007"
I had done something like this:
static public DataTable GetPubDates()
{
DataAccessAdapter adapter = new DataAccessAdapter(dbConnectionString());
ResultsetFields fields = new ResultsetFields(1);
fields.DefineField(PubDatesFieldIndex.Date, 0, "PubDate", "PubDate");
DataTable results = new DataTable();
adapter.FetchTypedList(fields, results, null, false);
return results;
}
// no idea how to how to do the where clause
Client side i had done something like this:
DataTable dt = PublishDates.GetPubDates();
lblTest.Text = (dt.Rows[1].IsNull("PubDate")).ToString();
but iam getting the result as false.
any suggestion please........................
thanks in advance