Hi,
Can anyone shed any light on this please?
I have a stored procedure in my SQL 2000 database. When i right click on it and script it, it produces the following SQL:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Sp_Taxi_AddTaxiAuthorityDetails]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[Sp_Taxi_AddTaxiAuthorityDetails]
GO
BUT, when I then log in as host and try and run this command using the SQL window it throws the following error:
System.Data.SqlClient.SqlException: Line 3: Incorrect syntax near 'GO'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Sp_Taxi_AddTaxiAuthorityDetails]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[Sp_Taxi_AddTaxiAuthorityDetails] GO
This doesn't just happen with this SP. When I try and create my sqlDataProvider file for use in my PA, ALL the database commands come back with errors something similar.
I just don't get it... Any ideas please?
Thanks in advance
Trev