Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Strange SQL BehaviourStrange SQL Behaviour
Previous
 
Next
New Post
1/22/2009 9:07 AM
 

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


www.taxiroute.co.uk - Get a Fare Price!
 
New Post
1/22/2009 9:18 AM
 

Make sure that:

1. You have an extra blank line after each 'GO'

2. Save your SqlDataProvider file in UTF-8 encoding, not ANSI as files not saved in UTF-8 will have certain characters (most notably the '+' symbol) stripped out during installation.

3. When running a script file in the Host --> SQL window, be sure to check "Run as Script" checkbox.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Strange SQL BehaviourStrange SQL Behaviour


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out