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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  nvarchar data type supported?
Previous Previous
 
Next Next
New Post 9/10/2008 10:23 AM
Resolved
User is offline ClydeS
55 posts
10th Ranked


nvarchar data type supported? 

I am attempting to create a table using the SQL script generated by DotNetNuke Dynamic Module template.

I added the following column "[Subject] [nvarchar(4000)] NOT NULL" and got the following. 

System.Data.SqlClient.SqlException: Column, parameter, or variable #6: Cannot find data type nvarchar(4000). 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) /************************************************************/ /***** SqlDataProvider *****/ /***** *****/ /***** *****/ /***** Note: To manually execute this script you must *****/ /***** perform a search and replace operation *****/ /***** for dbo. and *****/ /***** *****/ /************************************************************/ /** Create Table **/ if not exists (select * from dbo.sysobjects where id = object_id(N'dbo.[DHW_AnonFeedback]') and OBJECTPROPERTY(id, N'IsTable') = 1) BEGIN CREATE TABLE dbo.[DHW_AnonFeedback] ( [ModuleID] [int] NOT NULL, [ItemID] [int] NOT NULL IDENTITY(1, 1), [Content] [ntext] NOT NULL, [CreatedByUser] [int] NOT NULL, [CreatedDate] [datetime] NOT NULL, [Subject] [nvarchar(4000)] NOT NULL ) ALTER TABLE dbo.[DHW_AnonFeedback] ADD CONSTRAINT [PK_DHW_AnonFeedback] PRIMARY KEY CLUSTERED ([ItemID]) CREATE NONCLUSTERED INDEX [IX_DHW_AnonFeedback] ON dbo.[DHW_AnonFeedback] ([ModuleID]) ALTER TABLE dbo.[DHW_AnonFeedback] WITH NOCHECK ADD CONSTRAINT [FK_DHW_AnonFeedback_Modules] FOREIGN KEY ([ModuleID]) REFERENCES dbo.[Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION END System.Data.SqlClient.SqlException: Incorrect syntax near '@Subject'. 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.DHW_AddAnonFeedback @ModuleId int, @Content ntext, @UserID int, @Subject nvarchar(4000) as insert into DHW_AnonFeedback ( ModuleId, Content, CreatedByUser, CreatedDate, Subject ) values ( @ModuleId, @Content, @UserID, getdate() @Subject )

Thanks for any help,


Clyde
 
New Post 9/10/2008 10:47 AM
User is offline Brian Dukes
476 posts
www.engagesoftware.com
8th Ranked


Re: nvarchar data type supported? 

It should be [nvarchar](4000) rather than [nvarchar(4000)].

Also, the second error in that script is that you're missing a comma after getdate().

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 9/10/2008 12:11 PM
User is offline ClydeS
55 posts
10th Ranked


Re: nvarchar data type supported? 

Good eyes, all fixed up and going great.

Thanks much


Clyde
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  nvarchar data type supported?
 


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.

 


"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com
Data Springs Inc. - Module Development
Data Springs is a leader in the DNN community offering high quality modules, custom module development, enhancements to the DNN core product and overall DNN support.
www.datasprings.com
XCESS expertise center b.v.
Custom made modules and complete solutions for the DNN framework. Maatwerk modules en complete webtoepassingen gebaseerd op het DNN framework.
www.xcess.nl

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