TableMappings in DAAB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
While getting the data from the DB we change the tables names (using the
tableName property). sending it to the client and then back. We are using
sqlHelper.UpdateDataset (from the DAAB 2.0). Since the table names were
changed we tried to expand the DAAB to perform tablemapping. We added an
overload to the UpdateDataset method in which we provide the original table
name:
public static void UpdateDataset(SqlCommand insertCommand, SqlCommand
deleteCommand, SqlCommand updateCommand, DataSet dataSet, string
dataTableName, string tableName)

and then, added:

dataAdapter.TableMappings.Add(tableName, dataTableName);

The problem is that the dataAdapter.Update method throw an exception:
"Invalid object name 'CalloutSchedule'" (when 'CalloutSchedule' is the the
name of the dataTable in the dataSet, which was provided through the
dataTableName parameter). We made 100% sure that we do provide the correct
dataTables names and that they are part of the dataSet we send.

Is there a problem with the way we use the tableMapping? Why can't the
update method loacte out dataTable in the dateSet?

Thanks,
 
Back
Top