sp_helpfile Execute
-
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
Have a look at my most excellent tool, DBHelper ;p http://www.codeproject.com/cs/database/dbhelper.asp[^]
-
Have a look at my most excellent tool, DBHelper ;p http://www.codeproject.com/cs/database/dbhelper.asp[^]
-
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
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 theSqlCommand.Parameters.Add
method as I did with the other stored proc.Microsoft MVP, Visual C# My Articles
-
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 theSqlCommand.Parameters.Add
method as I did with the other stored proc.Microsoft MVP, Visual C# My Articles
-
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
Handle the
SqlConnection.InfoMessage
event. With each message printed by the server this event is raised. You can get the message from theSqlInfoMessageEventArgs
that is passed to your handler.Microsoft MVP, Visual C# My Articles