Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Module Upgrade Error
Previous Previous
 
Next Next
New Post 9/4/2008 3:44 PM
Resolved
User is offline zoran
12 posts
10th Ranked


Module Upgrade Error  

I wrote a module for DNN and it worked fine! Resently I make some changes and wanted to update my module from version 01.00.00 to version 01.01.00!

I have to Sql scripts When I the module I run into follwoing Issue:

 

StartJob Begin Sql execution
Info Executing 01.00.00.SqlDataProvider
StartJob Start Sql execution: 01.00.00.SqlDataProvider file
EndJob End Sql execution: 01.00.00.SqlDataProvider file
 
Info Executing 01.01.00.SqlDataProvider
StartJob Start Sql execution: 01.01.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near 'cast'. Incorrect syntax near ' AND Item = '. Incorrect syntax near ' AND [status] = '. 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 Stored Procedures **/ CREATE PROCEDURE dbo.GetMoistureSensitiveItems_All -- Add the parameters for the stored procedure here @PortalID int, @BagID int, @item nvarchar(30), @Status [nvarchar](10) AS declare @qry nvarchar(1000) if @BagID is null or @BagID = 0 begin set @qry = 'SELECT MoistureSensitiveBagID, PortalID, Item, CreatedDate, CreatedByUser, SensitivityLevel, IsOpen, dbo.GetAccumulatedTime(MoistureSensitiveBagID) "AccumulatedTime", [status], LastUpdate FROM dbo.MoistureSensitiveItems where PortalID = ' cast(@PortalID as varchar(5)) if @item is not null BEGIN set @qry = @qry ' AND Item = ' N'''' @item N'''' END set @qry = @qry ' AND [status] = ' N'''' @Status N'''' exec(@qry) end Else BEGIN SELECT MoistureSensitiveBagID, PortalID, Item, CreatedDate, CreatedByUser, SensitivityLevel, IsOpen, dbo.GetAccumulatedTime(MoistureSensitiveBagID) "AccumulatedTime", [status], LastUpdate FROM dbo.MoistureSensitiveItems WHERE PortalID = @PortalID and MoistureSensitiveBagID = @BagID END
EndJob End Sql execution: 01.01.00.SqlDataProvider file
 
   
   

But if I copy the code from script 01.01.00 and put everything into script file 01.00.00 deinstall the module and reinstall it, the script gets execuded without an error! DO I miss anything? The script is OK I was able to run it manually from the SQL Script window?

 

I am struggling almost the hole day! Any help is appreciated?

Thanks!

 

 
New Post 9/4/2008 4:46 PM
User is offline Michael Washington
2842 posts
ADefWebserver.com
5th Ranked










Re: Module Upgrade Error  

You have to save your sql script as UTF-8

see:

http://weblogs.asp.net/christoc/archive/2006/07/05/DotNetNuke-Daily-Tip-_2300_7-7_2F00_5_2F00_06-Module-Update-SQL-Scripts.aspx



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 9/5/2008 8:54 AM
User is offline zoran
12 posts
10th Ranked


Re: Module Upgrade Error  

Awsome!!!

You are a life saver! That would take me for ever to figure our!

 

Thanks,

Zoran

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Module Upgrade Error
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Swirlhost Inc.
Affordable DotNetNuke Hosting, Skin Development, Custom Module Development, and DotNetNuke Consulting. We will install your preference of DNN and now host with us and get a free license for the Swirl AJAX Chatroom Module.
www.swirlhost.com
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP