Trofimich wrote:
> 
>> Use IDataAdapter's RowUpdated event.
> 
> Did you use ADO.NET 2.0? Maby i'm stupid but i can't find even something 
> similar there...
> 
> I want to make form for editing table. I connected to database and 
> generated DataSet, BindingSource and TableAdapter.
> 
> Now i need to make inserting.
> 
> Table consists from 3 fields: Id, OperatorId, Notes
> 
> Id i'll generate in databse - clear for me;
> 
> Notes i'll filled from field value - clear for me;
> 
> OperatorId i should set manually from some variable.
> 
> The problem is that i can't find any suitable event for this.
> 
> TableAdapter does not have any events at all, BindingSource has event 
> AddingNew, but it's agument e.NewObject is always null. DataSet has no 
> suitable events too.
> 
> How can i set field value (not in grig) before it will be added to
> dataset?
> 
> 

Hi, as far as i understand RowUpdated is an event of FbDataAdapter, don't
search for it in DbDataAdapter, or 
IDataAdapter


While inserting i usually do so:
1) with DataView filter only Added Rows
2) for each Added Row get the new value for Primary Key Column (from
corresponding generator)
3) Set your id's to retrieved values and save the whole table (for DataSet
perfom this action for needed Tables, hope you don't save 50 tables at once)

Of course i would never insist on that this solution is pretty, but i didn't
find any other till now (i would also consider using insert returning, but
later maybe) and i would really like to see other possibilities to solve the
case
-- 
View this message in context: 
http://www.nabble.com/Understanding-some-conceptions-tf2939297.html#a8238997
Sent from the firebird-net-provider mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to