如果你的表是外部表,你的数据库是sqlserver,你要把#改成单引号'
如果还报错,就是日期格式问题,AfterOpenProject写代码
Dim cd As System.Globalization.DateTimeFormatInfo = System.Globalization.DateTimeFormatInfo.CurrentInfo
cd.ShortDatePattern = "yyyy年MM月dd日"
Dim DateInfo As System.Reflection.FieldInfo = cd.Gettype.GetField("generalLongTimePattern", System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance)
If DateInfo IsNot Nothing Then
DateInfo.SetValue(cd, "yyyy-MM-dd HH:mm:ss")
End If