1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Commit and Rollback in ASP with JAVASCRIPT LANGUAGE (not VBS)

Discussion in 'C#' started by zaphirus, Jul 15, 2006.

  1. #1
    Hi, all...

    I need to have transactions control with JAVASCRIPT ASP LANGUAGE (server-side, not

    client-side...Remember asp can use VBS, JS or Pearlscript).

    I have one table A and one table B (1:n) and so i need to use INSERT(table A), SELECT (PK
    SEMrush
    from table A) and INSERT (n times in table B).

    In the end, i need to return to ASP if the transaction was commited or rolled back!...if i

    didn't need that, i could just make a big sql string to send to the database, but if i did,

    how would i return the result to the asp?

    Thanks in advance...
     
    zaphirus, Jul 15, 2006 IP
    SEMrush
  2. web_guy

    web_guy Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I donno if there are more ways to do this .....

    Create a connection and then put the whole thing in between the transaction .... If there is an error then just roll back the transaction .... Collect the syntax from the web ....

    The pk value access can be done by SQL Query "Select @@IDENTITY as urID"

    I think this may help

    But I do prefer using a Stored Procedure for the whole process

    I hope u get me ....
     
    web_guy, Jul 19, 2006 IP