我有一个用于添加新产品的 .aspx 页面,包括以下字段:
ID, Name, DateTime, Price
它在本地主机上运行良好,但是当我将它发布到服务器时,我收到以下错误:
System.Data.UpdateException: An error occurred while updating the entries. See the InnerException for details. ---> System.ArgumentException: The version of SQL Server in use does not support datatype 'datetime2'
Localhost: SQL Server 2008 R2
Server: SQL Server 2005 Express
虽然我将数据库生成为 SQL 2005 格式并确保没有“datetime2”数据类型,但错误仍然存在。我不知道为什么。请帮我一把。
任何帮助将不胜感激!