How to execute SQL Script in VB? - TechRepublic
General discussion
May 18, 2001 at 04:28 PM
ohjani

How to execute SQL Script in VB?

by ohjani . Updated 24 years, 10 months ago

how do i execute a sql scripte in VB6? the script looks like below:

=====================================
if exists (select * from dbo.sysobjects where id = object_id(‘[dbo].[rptBrandListing]’) and OBJECTPROPERTY(id, ‘IsView’) = 1)
drop view [dbo].[rptBrandListing]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.[rptBrandListing]
AS
SELECT [tblBrand].[BrandID], [tblBrand].[BrandName]
FROM tblBrand

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
=======================================

seems that “DataEnvironment1.Connection1.Execute” is not capable in running a script which contains a key.

This discussion is locked

All Comments