Narcobaleno
New member
- Joined
- Jun 6, 2007
- Messages
- 2
- Programming Experience
- 3-5
Hi everybody...
It is possible to execute a TQSL via code using VB.NET?
The TQSL is the following:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MailAddAccount]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[MailAddAccount]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[MailAddAccount]......
I have tryed to do it using a SQLCommand but i have teh exception
"CREATE/ALTER must be the first statement in batch query..."
Any idea to help me?
Thanks
Raul
It is possible to execute a TQSL via code using VB.NET?
The TQSL is the following:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MailAddAccount]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[MailAddAccount]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[MailAddAccount]......
I have tryed to do it using a SQLCommand but i have teh exception
"CREATE/ALTER must be the first statement in batch query..."
Any idea to help me?
Thanks
Raul