Hi Daniel,

Timestamp is not a datetime type in SQL Server, it's a synonym for
rowversion which is a incrementing number for versioning. See
https://docs.microsoft.com/en-us/sql/t-sql/data-types/rowversion-transact-sql?view=sql-server-ver15

You should use datetime2:

 Alter Table Timetable  ADD UPDATE_TIMESTAMP *datetime2*;


Regards,
Ivan


On Wed, Nov 13, 2019 at 10:09 AM Daniel Wenning <
[email protected]> wrote:

> Hi,
>
> I am trying to create an UPDATE_TIMESTAMP as version column.
>
> In code i got
>     UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.TIMESTAMP,
> 0, true);
>
> and in SQLSERVER i got
>     Alter Table Timetable  ADD UPDATE_TIMESTAMP Timestamp;
>
> When trying to insert or update a new entry for Timetable i get the error
>
> INFO  [2019/11/13 09:48]: An Error occured. Message is: The database
> operation failed. Native error is: Die Konvertierung von "timestamp" in
> "TIMESTAMP" wird nicht unterstützt.  at
> org.apache.empire.exceptions.EmpireException.log(EmpireException.java:124)
> org.apache.empire.db.exceptions.EmpireSQLException: The database operation
> failed. Native error is: Die Konvertierung von "timestamp" in "TIMESTAMP"
> wird nicht unterstützt.
>
> What is the Error here?
>
> Thanks in advance!
>
> --
> Sincerely
>
> Daniel Wenning
> 8th Semester
> Angewandte Informatik
> HTWG Konstanz
>
>

Reply via email to