Replace a store procedure com VB app

  • How I can replace a complete and long store procedure in SQL 2000 from a VB application?

    I need to distribute a new version of my application and I must to update some store procedures..

    Thank you...Carlos

    Pinga de Banfield



    Pinga de Banfield

  • VB Psuedo code

    Add a reference to the "Windows Script Host Object Model"

    Dim objShell As IWshRuntimeLibrary.IWshShell_Class

    Dim hdlShell As IWshRuntimeLibrary.WshExec

    Dim ObjSTDOUT As TextStream

    Dim strSTDOUT As String

    Set objShell = New IWshRuntimeLibrary.IWshShell_Class

    Set hdlShell = objarrShell(1).Exec("C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isql.exe ") 'set the server, userid, password and inputfile parameters, look them up

    Set ObjSTDOUT = hdlShell.StdOut

    strSTDOUT = ObjSTDOUT.ReadAll

    MsgBox strSTDOUT 'This is what the program bounces back to the console

    hdlShell.Status will = 1 when complete, 0 when running, and (I think) -1 if it errors

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

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