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 |
|
mgour
Starting Member
1 Post |
Posted - 2005-03-06 : 05:52:44
|
| i wrote a sub in VB with this command Dim oSrv As SQLDMO.SQLServerDim oDatabase As SQLDMO.DatabaseDim oStoredProcedure As New SQLDMO.StoredProcedureSet oSrv = New SQLDMO.SQLServeroSrv.Connect ".", "sa"Set oDatabase = oSrv.Databases("Northwind")oStoredProcedure.Text = Text1.TextoSrv.Databases.Item("northwind", "dbo").StoredProcedures.Add (oStoredProcedure)i got a error in the add commande that says propertie not supported by the object can someone say what is wrong or how to create a SP using sqldmo ?thank you for the helpMichel gour |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2005-03-06 : 09:15:22
|
| Set oDatabase = oSrv.Databases("Northwind")oStoredProcedure.Name = "moss"oStoredProcedure.Text = "create proc dbo.moss as declare @i int return"oDatabase.StoredProcedures.Add oStoredProcedureoSrv.DisconnectSet oStoredProcedure = NothingSet oDatabase = NothingSet oSrv = Nothing |
 |
|
|
|
|
|