Hi There
I keep getting the following error when generating my codesmith project.
I created a custom stored procedure then started getting the error.When I removed the custom proc I still got the error.
I have also tried parsing all the Stored procs and there is no syntax errors
Error while execution Sql file. System.Data.SqlClient.SqlException: Incorrect syntax near ')'. 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 MoM.Templates.CommonSqlCode.ExecuteSqlInFile(String pathToScriptFile, String connectionString) in c:\Documents and Settings\Stanton\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\TemplateLib\CommonSqlCode.cs:line 4589 at _CodeSmith.NetTiers_cst.Go() in c:\Documents and Settings\Stanton\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\NetTiers.cst:line 1504
Hello,
From the looks of it, it appears that you are using a really old version of .netTiers. I would download the latest build and see if this fixes the errors. If it doesn't then please attach your SQL Schema and I will take a look at it.Thanks-Blake Niemyjski
Blake Niemyjski CodeSmith Tools, LLC. Software Development Engineer Blog: http://windowscoding.com/blogs/blake/ .NetTiers team | Visit http://www.nettiers.com
Thanks
I am a bit weary of using the latest build now as we are about to go live .
Everything still seems to be building correctly in visual studio and any database changes are reflected.
It is just giving the error.
Is there no error log so that I can see wich stored proc is giving the problem.Also its the first time I have written a custom stored proc where a parameter is a text field,could this be causing the problem.
Stanton
The latest version is just a maintenance release. However. after looking at your exception again, I noticed that its throwing the error while trying to execute the sql after generation. Try setting the ExecuteSQL property to false and execute the file manually.
Thanks-Blake Niemyjski