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  |  

DotNetNuke Marketplace
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  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...  Fails registering Modules
Previous Previous
 
Next Next
New Post 5/11/2006 2:00 PM
User is offline Anoop Menon
2 posts
10th Ranked


Fails registering Modules 

Its throws an exception when I try to execute this

if not exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}Telekom_Xtree]') and OBJECTPROPERTY(id, N'IsTable') = 1)

BEGIN

CREATE TABLE {databaseOwner}[{objectQualifier}Telekom_Xtree]

(

[ModuleID] [int] NOT NULL,

[ItemID] [int] NOT NULL IDENTITY(1, 1),

[Content] [ntext] NOT NULL,

[CreatedByUser] [int] NOT NULL,

[CreatedDate] [datetime] NOT NULL

)

ALTER TABLE {databaseOwner}[{objectQualifier}Telekom_Xtree] ADD CONSTRAINT [PK_{objectQualifier}Telekom_Xtree] PRIMARY KEY CLUSTERED ([ItemID])

CREATE NONCLUSTERED INDEX [IX_{objectQualifier}Telekom_Xtree] ON {databaseOwner}[{objectQualifier}Telekom_Xtree] ([ModuleID])

ALTER TABLE {databaseOwner}[{objectQualifier}Telekom_Xtree] WITH NOCHECK ADD CONSTRAINT [FK_{objectQualifier}Telekom_Xtree_{objectQualifier}Modules] FOREIGN KEY ([ModuleID]) REFERENCES {databaseOwner}[{objectQualifier}Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION

END

GO


System.Data.SqlClient.SqlException: 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 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) if not exists (select * from dbo.sysobjects where id = object_id(N'dbo.[Telekom_Xtree]') and OBJECTPROPERTY(id, N'IsTable') = 1) BEGIN CREATE TABLE dbo.[Telekom_Xtree] ( [ModuleID] [int] NOT NULL, [ItemID] [int] NOT NULL IDENTITY(1, 1), [Content] [ntext] NOT NULL, [CreatedByUser] [int] NOT NULL, [CreatedDate] [datetime] NOT NULL ) ALTER TABLE dbo.[Telekom_Xtree] ADD CONSTRAINT [PK_Telekom_Xtree] PRIMARY KEY CLUSTERED ([ItemID]) CREATE NONCLUSTERED INDEX [IX_Telekom_Xtree] ON dbo.[Telekom_Xtree] ([ModuleID]) ALTER TABLE dbo.[Telekom_Xtree] WITH NOCHECK ADD CONSTRAINT [FK_Telekom_Xtree_Modules] FOREIGN KEY ([ModuleID]) REFERENCES dbo.[Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION END GO

 

 
New Post 5/11/2006 3:04 PM
User is offline Sebastian Leupold
15224 posts
www.deutschnetnuke.de
1st Ranked












Re: Fails registering Modules 

did you save your script UTF-8 encoded?

ensure, that there is no whitespace behind the go statement.


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 7/5/2006 10:51 AM
User is offline Rachael Schoenbaum
1 posts
10th Ranked


Re: Fails registering Modules 
I had a similar problem and discovered it was because the last line of my file was "GO" and I had not put an EOF character (i.e. pressing enter) afterwards.  Once I put an extra return line at the end of the file, it worked perfectly.

See http://forums.asp.net/thread/1097223.aspx for a thread where I found this answer.
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Fails registering Modules
 


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.

 


PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions
Advanced Web Portals by Infoscaler
Infoscaler is a California based company that provides advanced Web Portals, E-commerce Sites, Database Applications and Intranet Solutions on the DotNetNuke and Microsoft.NET platforms.
www.infoscaler.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult

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