Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
HenrydeSousa
Starting Member
1 Post |
Posted - 2008-01-24 : 06:22:26
|
Hi everybody.I have two questions on SQL-DMO.The first one: how can i retrieve the script for all the stored procedures in aparticular database?This is the code i used to do this but i would like to know wheter there is another way anda better way. Dim oSqlServer As New SQLServer oSqlServer.LoginSecure = True oSqlServer.Connect("(local)", "", "") Dim oDataBase As Database oDataBase = oSqlServer.Databases.Item("northwind") Dim oSP As StoredProcedure For Each oSP In oDataBase.StoredProcedures txt_script.Text = txt_script.Text + oSP.Script() NextThe second question is how can i put that script back to the database? i mean how can i compilethat script again?Note: i am using vb.netThanks in advanceHenry de Sousa |
|
|
|
|