Compatibility Mode for SQLServer--please interprete error msg  
Author Message
AlexBB





PostPosted: Visual C# General, Compatibility Mode for SQLServer--please interprete error msg Top

"dateTimed" is not a recognized table hints option. If it is intended as a parameter to a table-valued function, ensure that your database compatibility mode is set to 90.

I am not quite sure if the error msg refers to my .NET C# app (client side) or SQL Server side. Anyhow I have no idea how this compatibility mode can be assured.

I am trying to download some records from SQL Server to this app. I have done it before but I think the System.DateTime Type here is my first experience. So far it has been System.String only it seems. I mostly upload stuff in there and I've never had this problem before with any type including DateTime.

Please, help.

Thanks.




Visual C#8  
 
 
Dan Dittenhafer





PostPosted: Visual C# General, Compatibility Mode for SQLServer--please interprete error msg Top

Hi Alex,

The compatibility mode is a setting of the database instance on the server. Use the sp_dbcmptlevel stored procedure to find out what compatibility mode your database is set to:

= '{Database Name}'

You can also use the same stored proc to change the compatibility mode.


 
 
AlexBB





PostPosted: Visual C# General, Compatibility Mode for SQLServer--please interprete error msg Top

Thank you very much Dan. It occured to me after I posted that I could set up the compatibility mode 80 vs 90 mostly for reports in my VFP days. It did not help me to solve this problem though.

Here in SQL it is 90. I just checked it.

Thanks you very much indeed.