| |
|
|
|
|
|
|
|
|
|
 |    |  |
 | |  |
 | |  |
 | |  |
 | |  |
 |
|
|
|
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!
|
|
|
|
 |  |
|
| |
 |  |
|
|
|
Awsome!!! 
You are a life saver! That would take me for ever to figure our!
Thanks,
Zoran |
|
|
|
|  |
 | |  |
 | |  |
 | |  |
|  |
| |
 |
|
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.
|
| |
 |
|
|
|
|
|
|
|