Results 1 to 5 of 5

Thread: SQL Helper Inserting records and returning the ID

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    SQL Helper Inserting records and returning the ID

    Hi all ive just started using the SQLHelper and am in need of inserting a record and returning the @@identity

    im using the transaction method but it does not return anything "its not ment to"

    reading the help file it got members and one of them is

    ExecuteReaderTypedParams

    Executes a command that returns rows as a SqlDataReader using a DataRow’s column values as parameters.


    but how to in invoke it ???
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

  3. #3

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    hey pirate

    i know how to do @@indentity but i would like to know and to do it using the microsoft data access block (sqlhelper)

    many thanks
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by carlblanchard
    hey pirate

    i know how to do @@indentity but i would like to know and to do it using the microsoft data access block (sqlhelper)

    many thanks
    Sorry dude , I've never worked on that thing before but I believe the concept is identical . You might need to change OLE prefix for Sql prefix .

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You probably are going to have to make a SqlParameter that is an output one. Then you can set it's value to the identity in the procedure. When the procedure returns, you then access the value of this parameter to get it.

    I don't have specific code for this, but it seems pretty simple.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width