I have the code above:
Forgiven... When i update any column, all timestamp columns also be updated, the new value is now()..
id name dt
Apparently, it has been a very long time since we worked regularly with SQL Anywhere 9 and jConnect as it turns out that this is expected behaviour.
This behaviour is controlled by the automatic_timestamp option. When it is turned on, TIMESTAMP columns are provided a default value of TIMESTAMP. If the table has already been created via a TDS bases connection such as jConnect, you will need to change the column default from TIMESTAMP to another value ie., blank.
answered 17 Apr '14, 11:09
As Chris Keating notes, much to our chagrin, this is expected behavior for ASA 9.0.2.
This has been an interesting investigation to say the least.
answered 17 Apr '14, 12:17
I think the problem is related to understanding that SQL Anywhere TIMESTAMP columns are quite different from ASE/SQL Server TIMESTAMP columns. ASE/SQL Server TIMESTAMP columns can be used for row versioning - they update automatically.
Not so with SQL Anywhere. Here TIMESTAMP is equivalent to the DATETIME data type. These columns do not update automatically.
Also see the documentation on DEFAULT TIMESTAMP and DEFAULT CURRENT TIMESTAMP.
Please run your SQuirreL test against an empty SQL Anywhere 9 database with "request level logging" turned on.
Here's how to create and start that database:
"%ASANY9%\win32\dbinit.exe" ddd9.db "%ASANY9%\win32\dbeng9.exe" -o "c:\temp\ddd9log.txt" -zr sql ddd9.db
Here's how to connect:
Please post the entire "c:\temp\ddd9log.txt" log file so we can see what the server is seeing.
It will contain all the SQL coming from the client side; for example:
I. 04/17 09:15:58. ** REQUEST conn: 1 STMT_PREPARE "select * from dummy"