Browse by Tags

Related Posts

  • Re: Doing a double insert using FormView insert and SqlDataSource

    Execute scalar, would normally execute the defined sql command. Hence if you put e.Command.ExecuteScalar() in the ..._dataInserted Method of your datasource object or the formview's datainserted event it will cause a second insert. If you want to use the idendity or scope_idendity() have a look at...
    Posted to Web Forms (Forum) by abhm on 07-27-2007, 12:00 AM
    Filed under: Scope_Identity, sql, Identits seed
  • Re: @@identity

    After you do an insert you can return the key for the insert like: INSERT INTO [dbo].[table] ( name , phone) VALUES ("Denny", "555-1234") Return @@IDENTITY Also be sure to read on the differences of SCOPE_IDENTITY() and @@IDENTITY - to be sure which one you should use to return the...
    Posted to SQL Server, SQL Server Express, and SqlDataSource Control (Forum) by SuperGhost on 10-27-2006, 12:00 AM
    Filed under: Scope_Identity, @@IDENTITY, SQL
Page 1 of 1 (2 items)
Microsoft Communities