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.0Errors encountered during install of module, where dataprovider defines a stored proc with concat.Errors encountered during install of module, where dataprovider defines a stored proc with concat.
Previous
 
Next
New Post
8/24/2007 9:11 AM
 

I have run into an issue where if a stored proc has a concatenation operator in it the installation fails. If I run the script in the SQL adminstrative window it compiles / installs ok.

Has anyone else run into this?

-------------------------------------- SAMPLE STORED PROC (Doesnt install but does compile)-------------------------------------------

/* Module Installation Test */
if exists (select * from {databaseOwner}sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}ConcatProc') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure {databaseOwner}{objectQualifier}ConcatProc
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}ConcatProc
 (
 @stringOne varchar(6),
 @stringTwo varchar(6)
 ) 
AS
  DECLARE @stringResult varchar(100)
  Set @stringResult = 'Literal1'+@stringOne+'Literal2'+@stringTwo+'Literal3'
 RETURN
GO
-------------------------------------- Error produced from install -----------------------------------------

SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@stringOne'. 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) CREATE PROCEDURE dbo.ConcatProc ( @stringOne varchar(6), @stringTwo varchar(6) ) AS DECLARE @stringResult varchar(100) Set @stringResult = 'Literal1'@stringOne'Literal2'@stringTwo'Literal3' RETURN

 
New Post
8/24/2007 1:37 PM
 

This issue shows up because your SqlDataProvider files aren't saved as UTF-8.  If you can resave them with that encoding, it should work.  Apparently the representation of the + symbol is read incorrectly if it's in a default ASCII encoding.

Does that fix the problem?


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
8/28/2007 9:40 PM
 
You are absolutely on the money.
 
I opened the file in notepad and saved it in utf-8 format via save as and presto no more issue at install time. i.e. The file is processed via the installation normally. Thank you so much for your assistance. Man it was timely, I was due to deliver a module release and I didnt want to ship install instructions that included " Paste the contents of this file into the SQL window when logged in as admin :\)"
 
Anyway thanks again you are a lifesaver.
 
Regards,
John
 
New Post
2/18/2008 10:52 AM
 

Brian and John:

Thanks a lot!  I was having the same issue.  Converting the SQLDataProvider files from ANSI encoding to UTF-8 encoding via NotePad did the trick!  If either of you are ever in the neighborhood of Sarasota, FL, I'll buy you a brewski...a good, full-bodied brewski...not Bud Light or some other watery brew.

Thanks, again!
Van


See Ya! Van
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Errors encountered during install of module, where dataprovider defines a stored proc with concat.Errors encountered during install of module, where dataprovider defines a stored proc with concat.


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