SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    Milan, Italy
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PostgreSQL- Execute

    Hello again

    I have an INSER INTO, created using values passed in an XML and i have to insert it in to my PostgreSQL table via ASP.

    What i do is, I collect all the values in to a variable and then execute it as the following.

    Code:
    --- create my INSERT INTO ---
    
    conn.Execute strSQL
    So far this works

    What i want to know is how can I test the result of the execution query and then give a message to the user.

    For example
    Code:
    IF EXECUTE goes wrong
     set a session varible "execute" equal to "false"
    ELSE
     set a session varible "execute" equal to "true"
    END IF
    Is there anyway to test this??

    Thank you.
    dReAm

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i don't think that's possible. what's wrong with detecting if the execution failed in your host program?
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,627
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It's ASP. Error handling was not it's strong suit . . .

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    Milan, Italy
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but i wonder has anyone never wanted to test if an execute failed or not??!!
    dReAm

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,627
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Oh, with most other stacks, one would be able to have a better angle for handling errors, but for classic asp, your options were limited. You might want to think about upgrading to something more modern.


Bookmarks

Posting Permissions

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