views:

230

answers:

1

I'm trying to test a developer's application against a SQL Server 2005 database (80) instead of the normal SQL Server 2000 database that it would hit.

Is anyone aware of issues that could cause this error that are related to SQL?

'DateInterval.minute' is not a recognized dateadd option. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 'DateInterval.minute' is not a recognized dateadd option.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException: 'DateInterval.minute' is not a recognized dateadd option.] System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742 System.Data.SqlClient.SqlCommand.ExecuteReader() +41 ConnectString.Timeout.UpdateTimeout.UpdateTime() RoleMap.HelpDeskCust.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\program.aspx.vb:35 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750


Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407

+1  A: 

DateInterval.minute is not an option in SQL for either SQL 2000 (8.0) or SQL 2005 (9.0). It's a .net enumerator for use in .net DateAdd

You appear to be passing a .net construct to the database engine.

For true SQL, you'd have this: DATEADD(minute, number, date)

gbn
The developer isn't where I can speak with him right now. I'm trying to dig through his code but I haven't seen anything that looks like it's causing this as of yet.
jasoncrider
We found an item in the vb and commented it out.
jasoncrider