Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5
This is the forum to discuss the Wrox book Professional DotNetNuke Module Programming by Mitchel Sellers and Shaun Walker - Wrox DotNetNuke Series Editor; ISBN: 978-0-470-17116-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 3rd, 2009, 03:14 AM
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Script error

Hello,

The site gives me an error on this part, but I can't find the error:

create procedure {databaseOwner}[{objectQualifier}DNNModuleProgramming_VB_InsertGue stbookEntry]

@ModuleId INT,
@submitterName NVARCHAR(255),
@submitterWebsite NVARCHAR(255),
@submitterComment NTEXT,
@submissionDate DATETIME,
@isApproved BIT
AS
INSERT INTO {datebaseOwner}[{objectQualifier}DNNModuleProgramming_VB_Guestbook]
(ModuleId, submitterName, submitterWebsite, submitterComment, submissionDate, isApproved)
VALUES
(@ModuleId, @submitterName, @submitterWebsite, @submitterComment, @submissionDate, @isApproved)

GO

Error message:
System.Data.SqlClient.SqlException: Incorrect syntax near '}'. at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(S tring SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(Stri ng Script, Boolean UseTransactions) create procedure dbo.[DNNModuleProgramming_VB_InsertGuestbookEntry] @ModuleId INT, @submitterName NVARCHAR(255), @submitterWebsite NVARCHAR(255), @submitterComment NTEXT, @submissionDate DATETIME, @isApproved BIT AS INSERT INTO {datebaseOwner}[DNNModuleProgramming_VB_Guestbook] (ModuleId, submitterName, submitterWebsite, submitterComment, submissionDate, isApproved) VALUES (@ModuleId, @submitterName, @submitterWebsite, @submitterComment, @submissionDate, @isApproved)
--

I see that the stored procedure dbo.DNNModuleProgramming_VB_InsertGuestbookEntry is not created. The others are OK.

PLease help
DMitar

p.s. Strange! There is not empty space " " in the word Guestbook here:
create procedure {datebaseOwner}[{objectQualifier}DNNModuleProgramming_VB_InsertGue stbookEntry]

When i get in Edit Mode in Forum, there's not space between "e" and "s" on the word Guestbook. When I click "Save" in my browser I see:
{datebaseOwner}[{objectQualifier}DNNModuleProgramming_VB_InsertGue stbookEntry]
---

Also I named module GuestBook_vb except GuestbookVB as it's in the book example. I suppose it doesn't matter at all as i strictly check everywhere the the name is correct and i have no errors in VSTO 2008 in the project files.

Last edited by Digitborn.com; September 3rd, 2009 at 03:37 AM.
  #2 (permalink)  
Old September 3rd, 2009, 03:34 AM
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also get this message when i try to test/add the module:

Error: Guestbook1 is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException : Could not load type 'WroxModules.GuestBook_vb.ViewGuestBook_vb'. ---> System.Web.HttpParseException: Could not load type 'WroxModules.GuestBook_vb.ViewGuestBook_vb'. ---> System.Web.HttpParseException: Could not load type 'WroxModules.GuestBook_vb.ViewGuestBook_vb'. ---> System.Web.HttpException: Could not load type 'WroxModules.GuestBook_vb.ViewGuestBook_vb'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttrib ute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirect iveAttributes(IDictionary parseData) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exce ption ex) at System.Web.UI.TemplateParser.ParseStringInternal(S tring text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.g et_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTy peFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.Proc essBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.Perf ormBuild() at System.Web.Compilation.BuildManager.CompileWebFile (VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualP ath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl () --- End of inner exception stack trace ---
  #3 (permalink)  
Old September 3rd, 2009, 01:35 PM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

For the application error, have a look and make sure that your .dll file is in the /bin folder of the DNN installation.

For the SQL Script issue, take a look at the query in SSMS, it looks like there is some formatting issue with the SQL.
__________________
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #4 (permalink)  
Old September 4th, 2009, 02:41 AM
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your answer.

For the application error - OK, i missed the dll and it's ok now.

For the SQL error - I'm new to SQL Server Management Studio. I don't understand what you mean by take a look at the query in SSMS? Yes, it's kind of format error, do you mean to start the query script with SSMS? If yes, can you give me some short steps how to do it correctly?

Thanks in advance
DMitar
  #5 (permalink)  
Old September 10th, 2009, 08:47 AM
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please help me SSMS, where i have to take a look at?
  #6 (permalink)  
Old March 17th, 2010, 06:41 PM
Registered User
 
Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if this hasn't been solved, there is a typo in your script:
create procedure dbo.[DNNModuleProgramming_VB_InsertGuestbookEntry] @ModuleId INT, @submitterName NVARCHAR(255), @submitterWebsite NVARCHAR(255), @submitterComment NTEXT, @submissionDate DATETIME, @isApproved BIT AS INSERT INTO {datebaseOwner}[DNNModuleProgramming_VB_Guestbook] (ModuleId, submitterName, submitterWebsite, submitterComment, submissionDate, isApproved) VALUES (@ModuleId, @submitterName, @submitterWebsite, @submitterComment, @submissionDate, @isApproved)

that should be {databaseOwner} not datebase
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Run .sql Script file in MS SQL Server 2000? aarkaycee SQL Server 2000 5 October 12th, 2009 05:43 AM
SQL 200 script error Balaji1979 SQL Language 1 August 3rd, 2008 08:46 PM
sql script ttpdotcom BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 9th, 2008 03:08 PM
Generate SQL Script shaileshk SQL Server 2000 3 September 6th, 2005 03:12 PM
SQL Script !! ciko1973 Access 2 June 13th, 2003 07:10 AM



All times are GMT -4. The time now is 01:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.