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#
  4. sp_helpfile Execute

sp_helpfile Execute

Scheduled Pinned Locked Moved C#
databasecsharpsharepointhelptutorial
6 Posts 3 Posters 0 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.
  • B Offline
    B Offline
    betterc
    wrote on last edited by
    #1

    I'd like to be able to run the stored procedure sp_helpfile from within my C# program against my MSDE db. Is this possible? I haven't a clue on how to set up a structure to hold the results of the command. Any help would be appreciated. cb

    L H 2 Replies Last reply
    0
    • B betterc

      I'd like to be able to run the stored procedure sp_helpfile from within my C# program against my MSDE db. Is this possible? I haven't a clue on how to set up a structure to hold the results of the command. Any help would be appreciated. cb

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Have a look at my most excellent tool, DBHelper ;p http://www.codeproject.com/cs/database/dbhelper.asp[^]

      top secret AdvancedTextBox

      B 1 Reply Last reply
      0
      • L leppie

        Have a look at my most excellent tool, DBHelper ;p http://www.codeproject.com/cs/database/dbhelper.asp[^]

        top secret AdvancedTextBox

        B Offline
        B Offline
        betterc
        wrote on last edited by
        #3

        I ran the demo and got "An exception 'System.Data.SqlClient.SqlException' has occured in SPTestApp.exe". cb

        1 Reply Last reply
        0
        • B betterc

          I'd like to be able to run the stored procedure sp_helpfile from within my C# program against my MSDE db. Is this possible? I haven't a clue on how to set up a structure to hold the results of the command. Any help would be appreciated. cb

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You do it just like I told you to do for the sp_attach_db stored procedure. Look at the SQL docs for the names of the parameters and use this in the SqlCommand.Parameters.Add method as I did with the other stored proc.

          Microsoft MVP, Visual C# My Articles

          B 1 Reply Last reply
          0
          • H Heath Stewart

            You do it just like I told you to do for the sp_attach_db stored procedure. Look at the SQL docs for the names of the parameters and use this in the SqlCommand.Parameters.Add method as I did with the other stored proc.

            Microsoft MVP, Visual C# My Articles

            B Offline
            B Offline
            betterc
            wrote on last edited by
            #5

            Thanks for all of your help. I just didn't know how I 'captured' the return values. There is only one parameter to pass, the db. cb

            H 1 Reply Last reply
            0
            • B betterc

              Thanks for all of your help. I just didn't know how I 'captured' the return values. There is only one parameter to pass, the db. cb

              H Offline
              H Offline
              Heath Stewart
              wrote on last edited by
              #6

              Handle the SqlConnection.InfoMessage event. With each message printed by the server this event is raised. You can get the message from the SqlInfoMessageEventArgs that is passed to your handler.

              Microsoft MVP, Visual C# My Articles

              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