C
Christopher Weaver
It appears that the DA's Fill method does not grab the schema in situations
like this:
TasksCommandText = "SELECT * FROM \"tblTasks\" " + sTasksWhere +
sTasksOrderBy;
cmd.CommandText = TasksCommandText;
odbcDA_TaskActivities.SelectCommand = cmd;
dsTaskActivities.Clear();
odbcDA_TaskActivities.Fill(dsTaskActivities, "Tasks");
The DataSet Table "Tasks" doesn't get any of the constraints or PK
information from tblTasks. So what's the best way to go about getting the
schema and applying it to the DataTable? I've looked at FillSchema but it
creates tables of predefined names (Table1, Table2, etc.) with equally
useless column names. My code is written to reflect more meaningful names,
their actual names. Is there a way to get the schema and use the actual
identifiers, both column names and table names? What's the conventional way
of doing this?
like this:
TasksCommandText = "SELECT * FROM \"tblTasks\" " + sTasksWhere +
sTasksOrderBy;
cmd.CommandText = TasksCommandText;
odbcDA_TaskActivities.SelectCommand = cmd;
dsTaskActivities.Clear();
odbcDA_TaskActivities.Fill(dsTaskActivities, "Tasks");
The DataSet Table "Tasks" doesn't get any of the constraints or PK
information from tblTasks. So what's the best way to go about getting the
schema and applying it to the DataTable? I've looked at FillSchema but it
creates tables of predefined names (Table1, Table2, etc.) with equally
useless column names. My code is written to reflect more meaningful names,
their actual names. Is there a way to get the schema and use the actual
identifiers, both column names and table names? What's the conventional way
of doing this?