arch_and

arch_and

  • NA
  • 2
  • 0

Question on data sets and adapters

Nov 16 2005 6:53 PM

Hi all,

I am retrieving data from multiple tables using the following SQL  to store in the DataSet

SQL
=====
SELECT  MS.KY_SURVEY,
       MS.KY_MAINSURVEY,
       MS.KY_GEOGRAPHICAREA,
       MS.NO_MAINMILES,
       MS.NO_SURVEYFREQ,
       TX_GRID + ISNULL(TX_QUADRANT,'') + ISNULL(TX_QUARTERQUAD,'') Area
     FROM
       MAINSURVEY MS,
       SURVEY S,
       SURVEYOR SR,
       GEOGRAPHICAREA GA
    WHERE
     S.KY_SURVEY = MS.KY_SURVEY
    AND
     S.KY_SURVEYOR = SR.KY_SURVEYOR
    AND
     SR.TX_CONTROLNUMBER = '{0}'
    AND
     GA.KY_GEOGRAPHICAREA = MS.KY_GEOGRAPHICAREA




The first four  columns of the data retrieved belong to one table while the last column is an expression which is  retreived from  data coming  from  one of the other tables in the  join. I am storing all this data in a single DataTable   called  "MainSurvey".Now there is a table in the database which is titled MainSurvey  . Now the datatable MainSurvey  has one additional column (which itself is an expression from another table  ) than the DataSource Main Survey.

Now I have updated the DataTable in the dataset and wish to update the  data source as well . Can some one tell me how to set up the DataAdapter so that I can ignore this additional expression column  from the data table while  updating the data source  table "MainSurvey".  Is there anyway to do this using ColumnMappings ?.Any sample code would be appreciated.

Thanks,

Raja


Answers (1)