Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql-DMO
Message
From
29/10/2004 11:49:37
 
 
To
29/10/2004 10:16:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00955780
Message ID:
00955828
Views:
16
Just be aware that SQL-DMO is being depricated in SQL Server 2005. It will still ship, but won't be updated in the future. It's being replaced with SQL-SMO, a .NET-based API.


>Hi,
>
>How I make to execute a Script using SQL-DMO?
>Sample Script:
>
>
>if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TabelaPrecos_V]') and OBJECTPROPERTY(id, N'IsView') = 1)
>drop view [dbo].[TabelaPrecos_V]
>GO
>
>SET QUOTED_IDENTIFIER ON
>GO
>SET ANSI_NULLS ON
>GO
>
>/****** Object:  View dbo.TabelaPrecos_V    Script Date: 10/05/2004 08:41:33 ******/
>CREATE VIEW dbo.TabelaPrecos_V
>AS
>SELECT     TOP 100 PERCENT dbo.PRODUTOS.ProdNome, dbo.PROD_PRECOS.ProdPrecPreco, dbo.PROD_PRECOS.ProdID, dbo.PROD_PRECOS.TabelaID,
>                      dbo.PROD_PRECOS.ProdPrecID, dbo.TAB_PRECOS.FilialID
>FROM         dbo.PRODUTOS INNER JOIN
>                      dbo.PROD_PRECOS ON dbo.PRODUTOS.ProdID = dbo.PROD_PRECOS.ProdID INNER JOIN
>                      dbo.TAB_PRECOS ON dbo.PROD_PRECOS.TabelaID = dbo.TAB_PRECOS.TabelaID
>WHERE     (dbo.TAB_PRECOS.TabelaStatus = 0) AND (dbo.PRODUTOS.ProdStatus = 0)
>ORDER BY dbo.PRODUTOS.ProdDesc
>
>GO
>SET QUOTED_IDENTIFIER OFF
>GO
>SET ANSI_NULLS ON
>GO
>
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform