Dropped connection during Excel VBA

  • I have a spreadsheet that culls the data from the sheet and inserts these into parameters in stored procedures. If there is an error on the sheet or the datatype doesn't match, then the stored proc fails.

    What's the best way to handle this situation because I lose connections to the database when this happens.

  • Is this an Excel VBA question or an SSIS question? Or something else?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • axwack (12/26/2012)


    I have a spreadsheet that culls the data from the sheet and inserts these into parameters in stored procedures. If there is an error on the sheet or the datatype doesn't match, then the stored proc fails.

    What's the best way to handle this situation because I lose connections to the database when this happens.

    Are you using VBA to call the procs? Have you tried putting additional validation there to handle/avoid the errors? That's probably where I would start.


  • I would agree with Phil, especially if the data on the spreadsheet comes from manual entry by users. It would be relatively simple to test the datatypes of your values before passing them to the procedure.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply