Solved

Error while saving data

  • 9 August 2019
  • 8 replies
  • 198 views

Badge
I am getting data type conflict while saving data below is the query I got when I tried to debug

icon

Best answer by Mark Jongeling 9 August 2019, 17:16

it is int only
The Software Factory might say it's an Int but sadly the database registered the column with the datatype Time(7). What you could do it either writing a query to Alter the datatype of the column to Int or do a Full upgrade. During the full upgrade, all tables will be recreated thus it will change the datatype to the datatype as entered in the Software Factory
View original

This topic has been closed for comments

8 replies

Userlevel 6
Badge +14
Hey ChandanKavi,

Can you share the data types of the table you are trying to update? This query is shown in the Debug screen right?

Let me know, maybe I can help 😉
Badge
Description nvarchar(20)
number_of_shelves int
presentation_color char(10)

Userlevel 6
Badge +14
I think the column stand_type_id has the datatype 'time' and also think it is set to be an Identity column. The column will try and fill itself with a number, let say 1. But because the column is a Time column, it will give the "Msg 206, Level 16, State 2, Line 3 Operand type clash: int is incompatible with time" error.

Can you make sure the column stand_type_id is not 'Time'?

Reference:

Badge
No mark stand_type_id is int
see number_of_shelves is what conflicting but I checked the data type it is int

Userlevel 6
Badge +14
Then you found the problem there, 😉 number_of_shelves should indeed have the datatype Int
Badge
it is int only
Userlevel 6
Badge +14
it is int only
The Software Factory might say it's an Int but sadly the database registered the column with the datatype Time(7). What you could do it either writing a query to Alter the datatype of the column to Int or do a Full upgrade. During the full upgrade, all tables will be recreated thus it will change the datatype to the datatype as entered in the Software Factory
Userlevel 6
Badge +14
@ChandanKavi is the problem solved now?

Kind regards,
Mark