|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is it possible to include SELECT in Access OleDbCommand - Update?Is it possible to include Select statement after Update statement in OleDbDataAdapter - UpdateCommand, like it is possible in SQL Server For Example UPDATE myUnit SET InstitutionID = @InstitutionID WHERE (f_UnitID = @Original_f_UnitID) AND (InstitutionID = @Original_InstitutionID); SELECT f_UnitID, InstitutionID FROM myUnit WHERE (f_UnitID = @f_UnitID) If not, how to retreive in correct way For example, value of AutoIncrement field? Thanks Milan MilanB,
No, you cannot include a Select after an Update in Access. You can use "Select @@IDENTITY" with Access to retrieve the auto-generated primary key. Kerry Moorman Show quote "MilanB" wrote: > Hello, > > Is it possible to include Select statement after Update statement in > OleDbDataAdapter - UpdateCommand, like it is possible in SQL Server > For Example > > UPDATE myUnit > SET InstitutionID = @InstitutionID > WHERE (f_UnitID = @Original_f_UnitID) AND (InstitutionID = > @Original_InstitutionID); > > SELECT f_UnitID, InstitutionID > FROM myUnit > WHERE (f_UnitID = @f_UnitID) > > > If not, how to retreive in correct way For example, value of AutoIncrement > field? > > Thanks > Milan |
|||||||||||||||||||||||