|
|
|
Joined: 6/18/2008
Posts: 58
|
|
|
When installing a Module I created, I get the error below. I cant figure out what the problem is!
StartJob |
Start Sql execution: 01.00.00.SqlDataProvider file |
Failure |
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near 'school'. Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. 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.YourCompany_GetPGTs @ModuleId int as select ModuleId, ItemId, Content, CreatedByUser, CreatedDate state school schoolNS league sport subPrice subTerm1 subTerm2 singlePrice singleTerm1 singleTerm2 from YourCompany_PGT with (nolock) left outer join Users on YourCompany_PGT.CreatedByUser = Users.UserId where ModuleId = @ModuleId System.Data.SqlClient.SqlException: Invalid column name 'state'. Invalid column name 'school'. Invalid column name 'schoolNS'. Invalid column name 'league'. Invalid column name 'sport'. Invalid column name 'subPrice'. Invalid column name 'subTerm1'. Invalid column name 'subTerm2'. Invalid column name 'singlePrice'. Invalid column name 'singleTerm1'. Invalid column name 'singleTerm2'. 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.YourCompany_GetPGT @ModuleId int, @ItemId int as select ModuleId, ItemId, Content, CreatedByUser, CreatedDate, state, school, schoolNS, league, sport, subPrice, subTerm1, subTerm2, singlePrice, singleTerm1, singleTerm2 from YourCompany_PGT with (nolock) left outer join Users on YourCompany_PGT.CreatedByUser = Users.UserId where ModuleId = @ModuleId and ItemId = @ItemId System.Data.SqlClient.SqlException: Incorrect syntax near '@state'. Must declare the scalar variable "@UserID". 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.YourCompany_AddPGT @ModuleId int, @Content ntext, @UserID int @state string @school string @schoolNS string @league string @sport string @subPrice string @subTerm1 string @subTerm2 string @singlePrice string @singleTerm1 string @singleTerm2 string as insert into YourCompany_PGT ( ModuleId, Content, CreatedByUser, CreatedDate, state, school, schoolNS, league, sport, subPrice, subTerm1, subTerm2, singlePrice, singleTerm1, singleTerm2 ) values ( @ModuleId, @Content, @UserID, @state, @school, @schoolNS, @league, @sport, @subPrice, @subTerm1, @subTerm2, @singlePrice, @singleTerm1, @singleTerm2, getdate() ) System.Data.SqlClient.SqlException: Incorrect syntax near '@state'. Must declare the scalar variable "@UserID". 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.YourCompany_UpdatePGT @ModuleId int, @ItemId int, @Content ntext, @UserID int @state string @school string @schoolNS string @league string @sport string @subPrice string @subTerm1 string @subTerm2 string @singlePrice string @singleTerm1 string @singleTerm2 string as update YourCompany_PGT set Content = @Content, CreatedByUser = @UserID, CreatedDate = getdate() where ModuleId = @ModuleId and ItemId = @ItemId System.Data.SqlClient.SqlException: Incorrect syntax near '@state'. Must declare the scalar variable "@ItemId". 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.YourCompany_DeletePGT @ModuleId int, @ItemId int @state string @school string @schoolNS string @league string @sport string @subPrice string @subTerm1 string @subTerm2 string @singlePrice string @singleTerm1 string @singleTerm2 string as delete from YourCompany_PGT where ModuleId = @ModuleId and ItemId = @ItemId |
EndJob |
End Sql execution: 01.00.00.SqlDataProvider file |
|
|
|
|
|
| |
|
|
|
you have to follow naming conventions, i.e. names can consist of single words only.
|
|
|
|
| |
|
|
Joined: 2/22/2006
Posts: 87
|
|
|
When I use the default database sql generated by the Starter kit, I have no problem. But when I try to use sql I generated my self, i get sql errors.
The sql I generated runs fine on the SQL Query Analyzer, but does not run in the DNN SQL window.
Have you try to run your sql directly in the SQL Query Analyzer instead of using the DNN module installer to setup the data?
Is there another thread that post a solution to this?
|
|
|
|
| |
|
|
www.acuitisolutions.com Joined: 5/30/2003
Posts: 591
|
|
|
Look at your SQL
as select ModuleId, ItemId, Content, CreatedByUser, CreatedDate state school schoolNS league sport subPrice subTerm1 subTerm2 singlePrice singleTerm1 singleTerm2 from YourCompany_PGT with (nolock)
there is no comma after CreatedDate, state, ............ - Not sure how you're running this in any database without errors...
Sanjay
|
|
|
|
| |
|
|
Joined: 2/22/2006
Posts: 87
|
|
|
RDO did u solve your problem? If yes, what was wrong?
|
|
|
|
| |