Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. trap errors/exceptions occured while running exe through commandline

trap errors/exceptions occured while running exe through commandline

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    souchakra
    wrote on last edited by
    #1

    In my application I am using Shellexecute to run SQLs through isql.exe. I want to trap the exceptions/errors which isql throughs in messagebox dialogs. Can I trap those messages anyway out.:confused: Souchakra

    J 1 Reply Last reply
    0
    • S souchakra

      In my application I am using Shellexecute to run SQLs through isql.exe. I want to trap the exceptions/errors which isql throughs in messagebox dialogs. Can I trap those messages anyway out.:confused: Souchakra

      J Offline
      J Offline
      Juergen Froehlich
      wrote on last edited by
      #2

      Try using SQL Server 2000 commandline tool osql which is the recommended tool for running sql scripts on commandline (if you not need to connect to SQL Server 6.5 or before). All sql server 2000 commandline tool output errors on stdout/stderr and there should be no message box at least. To catch the output it is a good idea to use the -o switch which directs it to the given file. (For more options see sql server 2000 online help "Using the SQL Server Tools) Possibly the messagebox may occur because ShellExecute is used and has this (configured?) effect for the case of a stderr output?

      S 1 Reply Last reply
      0
      • J Juergen Froehlich

        Try using SQL Server 2000 commandline tool osql which is the recommended tool for running sql scripts on commandline (if you not need to connect to SQL Server 6.5 or before). All sql server 2000 commandline tool output errors on stdout/stderr and there should be no message box at least. To catch the output it is a good idea to use the -o switch which directs it to the given file. (For more options see sql server 2000 online help "Using the SQL Server Tools) Possibly the messagebox may occur because ShellExecute is used and has this (configured?) effect for the case of a stderr output?

        S Offline
        S Offline
        souchakra
        wrote on last edited by
        #3

        Hai Juergen, Thanx for your urly response.U suggested me of using osql but, I have to use Sybase Anywhere 5.5 which has the rtdsk50 eng free to distibute.For the same I am using isql.exe. Could u suggest me anything related to this....:confused:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups