update datatable populated using join

  • Thread starter Thread starter Stefano Mostarda
  • Start date Start date
S

Stefano Mostarda

Hi there,

I have a typed dataset with a datatable filled using a query resulting
from a join within 2 db tables.

I want to update the data modified by the user only on 1 db table.

Should I intercept the row updating event of the oledbdataadapter and
apply the updates manually or there is some implicit mechanism to tell
the oledbdataadapter what fields he have to updated and on what table?

I ask this as I come from delphi development and this was a good feature.

Thanks in advance,
Stefano Mostarda MCP
Rome Italy
 
Hi Stefano,

When you get your data using DataAdapter, then it suppose to generate
appropriate action queries (like INSERT, UPDATE and DELETE), so you should
be OK unless provider is not capable to do this. In this case you could
build your own commands for INSERT, UPDATE and DELETE and assign them to the
InsertCommand, UpdateCommand and DeleteCommand properties of the DataAdapter
 
My suggestion here is to use crerate your own INsertCommand,UpdateCommand, and DeleteCommand objects In these objects you should use the OleDbParameter object and specifythe SourceColumn, and SourceVersion properites. This will allow you to map specific data columns form a data table to your SQl statement

Keena

----- Stefano Mostarda wrote: ----

Hi there

I have a typed dataset with a datatable filled using a query resulting
from a join within 2 db tables

I want to update the data modified by the user only on 1 db table

Should I intercept the row updating event of the oledbdataadapter and
apply the updates manually or there is some implicit mechanism to tell
the oledbdataadapter what fields he have to updated and on what table

I ask this as I come from delphi development and this was a good feature

Thanks in advance
Stefano Mostarda MC
Rome Ital
 
Back
Top