datetime vs datetime2 parameter issues
Posted: Fri 30 Sep 2011 22:15
Our testing has shown that if we have a datetime field in our table, a datetime2 parameter is created in the update stored procedure. This causes problems because of the difference in precision between the two types. When the parameter type is chosen for the update, shoudn't it be based on the actual datatype of the field in the table?
Also, we have found that if a datetime field is left NULL, and we generate the UpdateSQL, all subsequent updates fail. The difference between creating the UpdateSQL ourselves and letting SDAC create it, is that the the resulting SQL Server statments generated are different. The SDAC created version uses IS NULL in the SELECT, but when we fill in the UpdateSQL property on the query, it is trying to evaluate DATE=NULL in the WHERE clause.
Please let me know if you are aware of these issues, and if they will be fixed in the next release.
Thanks!
Also, we have found that if a datetime field is left NULL, and we generate the UpdateSQL, all subsequent updates fail. The difference between creating the UpdateSQL ourselves and letting SDAC create it, is that the the resulting SQL Server statments generated are different. The SDAC created version uses IS NULL in the SELECT, but when we fill in the UpdateSQL property on the query, it is trying to evaluate DATE=NULL in the WHERE clause.
Please let me know if you are aware of these issues, and if they will be fixed in the next release.
Thanks!