Clarion normally does what is called optimistic concurrency checking. The where resourceid = 314 is necessary to actually identify the record. And the example I posted above looks like yours. It comes from hand code like:
get(buscase,BUS:PK_BUSPASS)
BUS:modified_date_date = today()
BUS:modified_date_time = clock()
put(buscase)
But the templates when they do a .Fetch incorporate a call to WATCH, so the .Update looks like:
update buscase set modified_date = <:new_value> where id = :id and modified_date = :old_mod_date_value and thiscolumn is NULL and thatcolumn = :oldthatcolumn and ā¦
where the :Id and :old_mod_date_value and :oldthatcolumn are the values that were stored by the WATCH when the record was grabbed. If it doesnāt manage to update the record (0 rows were updated), it will give you the āRecord Changed by another stationā error. That can sometimes really be caused by someone else having overwritten the record , but in the Clarion world the more likely cause is that the WATCH stored something that doesnāt totally match what is in the database: it truncated the fractional seconds, or only stored the first 20 characters of a 30 character string, etc.
I still strongly suggest you check the installed ODBC 32 drivers. You need to have a SQL Native Client driver installed and not just use the build-in SQL Driver.
Iāve seen this exact behavior before. An yes, I had other tables and even other columns in the same table that did not get the additional precision digits for the time portion of the inserted value.
But did you do the last part? i.e. Wizard an app using ONLY the 2 files?
Not just look at the definitions but actually use them in an isolated environment?
The fact that a datetime2 is being generated suggest a difference.
Maybe some residual definition is somehow getting in the way (No idea how) but
Use the Clarion trace for the file giving you trouble and one of the similar files that works fine.
Make sure you trace from before the file is opened in both cases.
When it opens the file Clarion gets a bunch of information about the file as it is declared on the SQL side. It uses that information, for example to give you the āfile does not match declarationā if you have a column in your clarion dictionary that does not have a similarly-named column on the SQL side.
What you are looking for is any difference in the information that Clarion gets for the Modified_date column for your problem file, and for your OK file. And if you can see that difference in the Trace file, you should be able to see a similar difference in the SQL table declaration.
Although having said thatā¦I just looked at a trace file for my system, which is Oracle, not MSSQL, and the relevant part is a bunch of lines like:
045BCH(2) 11:16:25.460 Getting information for field 11 Getting attribute OCI_ATTR_NAME for Parameter 03E63ED8H Return Code: 0 Time Taken:0.00 secs
045BCH(2) 11:16:25.460 Getting attribute OCI_ATTR_DATA_TYPE for Parameter 03E63ED8H Return Code: 0 Time Taken:0.00 secs
045BCH(2) 11:16:25.460 Getting attribute OCI_ATTR_CHARSET_FORM for Parameter 03E63ED8H Return Code: 0 Time Taken:0.00 secs
And what you are really interested in is the data_type that is returned, which at least in the Oracle trace, it doesnāt tell you. With luck the MSSQL trace is more informative .