SQL: Microsoft SQL Server 2008 Express (MSSQL10_50.SQLEXPRESS)
Microsoft has introduced a new data type: datetime2
- Code: Select all
+-----------+-------------------------+-------------------------+
| | datetime | datetime2 |
+-----------+-------------------------+-------------------------+
| range | 01/01/1753 - 12/31/9999 | 01/01/0001 - 12/31/9999 |
+-----------+-------------------------+-------------------------+
| precision | 3 1/3 milliseconds | 100 nanoseconds |
+-----------+-------------------------+-------------------------+
When Servoy adds a datetime column to a MSSQL table (e.g. solution installation), MSSQL will default to the new 'datetime2' type. The JTIDS driver that comes with Servoy does not support the 'datetime2' type, and your solution will not display date values. Elsewhere on the Forum, someone suggested using the JDBC driver from Microsoft, however, we could not get it to work (we could not get past the 'CLASSPATH' error message). We ended up using the MS SQL Server Management Studio to change the 'datetime2' columns to 'datetime' as follows:
- 1. Click on the 'New Query' button.
2. Type 'sp_help tablename' to view the table structure (click the '!' button to execute the statement)
3. ALTER TABLE tablename
ALTER COLUMNNAME columnname DATETIME
Highlight the two ALTER statements, then click '!' to execute the statements
Hopefully, this will help others that run into this problem.