VS.Net not returning identity values
From: Rob Oldfield (rob_at_oldfield100_wow_freeserve_yikes_co_incredible!_uk)
Date: 06/28/04
- Next message: Malcolm P.: "Difficulty with .Net installer User Interface"
- Previous message: Steve McLellan: "Re: VS.NET Perfomance and speed question ( Comparing with C++ Apps)"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Jun 2004 19:26:28 +0100
A strange situation that I've just sorted out, but I'm looking for an
explanation...
I have a dataset that is pulling information back out of an SQL 2K server.
I'm setting the PK values of the datatable to negative values when using it
in my code and then expecting them to be updated to the correct ID values
when I run an update.
That works fine if the SQL statement for the dataadapter is a
straightforward select, but if I complicate things a little by introducing a
criteria on a parent table (i.e. I don't want all the subtable rows, just
those where a condition is true on the parent table) then the insert and
update commands generated by VS.Net (2003) don't automatically include the
select command to retrieve the newly inserted ID values. I've just gone in
and manually added those select commands but my question is...
Why doesn't VS do it for me? Am I missing something?
- Next message: Malcolm P.: "Difficulty with .Net installer User Interface"
- Previous message: Steve McLellan: "Re: VS.NET Perfomance and speed question ( Comparing with C++ Apps)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|