This project is read-only.

Setup Issues SQL

Nov 25, 2009 at 6:14 PM

Hi all..

When I attempt to create tables i'm getting this error, I believe that i have the correct permissions set and have also tried Integrated vs. SQL Auth. Any ideas?

 

-J

 

An error occured: System.Data.SqlClient.SqlException: Line 4: Incorrect syntax near 'max'. 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 setup_build_database.btnRunSQL_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\setup\build_database.aspx.cs:line 66

Nov 26, 2009 at 4:37 AM

I really have no idea.  It seems you have proper permissions.

What I would do is to clear out your DB and try running each little chunk of setup/setup_Data/setup.sql manually to see which part is erroring out and work from there - this isn't a problem that has ever occured before.

Dec 16, 2009 at 9:33 PM

Now it has happened twice! :)

I am getting the same error:

An error occured: System.Data.SqlClient.SqlException: Line 4: Incorrect syntax near 'max'. 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 setup_build_database.btnRunSQL_Click(Object sender, EventArgs e) in e:\Intranet\SlickTicket\setup\build_database.aspx.cs:line 66

If I'm able to track down a resolution, I'll let you know.

Dec 17, 2009 at 5:10 PM

It is a SQL syntax error, I must have screwed it up when adding the new stuff (that's why this isn't in a release, it's not tested) - I am still in the process of moving, but when I get set up I will figure it out.

Dec 17, 2009 at 5:15 PM

I think its a version issue. Turns out that the SQL Server instance on my web server is SQL Server 2000 (8.something).

I was able to run the script fine against the local instance on my devopment system -- it's 10.something.

The (max) syntax was new for 2005, so it is invalid syntax for Sql Server 2000.