This warning/error message shows up sometimes when working with Clarion and SQL based data.
When working on a recent conversion project I received the message when testing. I had moved a database from .TPS files to a MS-SQL Server database.
I had seen this message many times before when getting started with SQL and dealing with DateTime data fields. So I knew exactly where to look this time. Looking through the table in question, I noticed that I had no DateTime fields in the table. So something else was causing the warning -Â Record Changed By Another Station . But, as there were no other Stations Â active, I was now in search of the source of the message.
First thing I checked was the order of the fields in my Dictionary, and theÂ order of the fields in the database. This should not cause the error, but whoÂ knowsâ€¦ This all checked out OK.
Next I checked the data types were aligned and this too was all OK.
That is when I noticed that I had a STRING field in my dictionary asÂ STRING(12) and in the database it was declared as CHAR(16). Yep, I hadÂ deliberately made it wider when I designed the new table but I had forgottenÂ to adjust my Dictionary. Once I adjusted my dictionary to match the database,Â and re-compiled. all worked as it should.
But why would it report the Record Changed By Another StationÂ warning, and not some more relevant message? Probably because the Clarion SQLÂ file driver was doing its job correctly, and comparing my initially saved fileÂ buffer (with the 12 bytes I had in my string in my dictionary). Then, just as
I go to save my changed to the database, the SQL File Driver re-reads the dataÂ from the database, this time not using my data declarations, but the data as
defined in the SQL table. It then does a byte-by-byte compare with the savedÂ buffer. They do no match, so the warning message is displayed.