Error when adding a Hispanic subgroup in the Demographics tab

Modified on Thu, 02 Apr 2015 16:43 by Kevin Ricciardo — Categorized as: Uncategorized

When adding a Hispanic subgroup to a client on the demographic tab in CAREWare, this error is generated:



String or binary data would be truncated. The statement has been terminated.

INSERT INTO cw_change_log ( chn_lg_pk , chn_lg_table_name , chn_lg_pk_value , chn_lg_field_name , chn_lg_is_delete , chn_lg_new_value , chn_lg_usr_fk , chn_lg_dmn_fk , chn_lg_bt_version , chn_lg_date_time) VALUES (@chn_lg_pk , @chn_lg_table_name , @chn_lg_pk_value , @chn_lg_field_name , @chn_lg_is_delete , @chn_lg_new_value , @chn_lg_usr_fk , @chn_lg_dmn_fk , @chn_lg_bt_version , @chn_lg_date_time)

cw_change_log.chn_lg_pk=2194 cw_change_log.chn_lg_table_name=cw_map_client_hispanic_subgroups cw_change_log.chn_lg_pk_value=0 cw_change_log.chn_lg_field_name=map_cl_hsp_sb_hsp_sb_rfk cw_change_log.chn_lg_is_delete=False cw_change_log.chn_lg_new_value=1 cw_change_log.chn_lg_usr_fk=a5643502-7e0e-481c-8de6-39cfcabdfc16 cw_change_log.chn_lg_dmn_fk=ffffffff-0000-0000-0000-000000000002 cw_change_log.chn_lg_bt_version=89.1

INSERT INTO cw_map_client_hispanic_subgroups ( map_cl_hsp_sb_hsp_sb_rfk , map_cl_pk , map_cl_hsp_sb_last_updated) VALUES (@map_cl_hsp_sb_hsp_sb_rfk , @map_cl_pk , @map_cl_hsp_sb_last_updated) cw_map_client_hispanic_subgroups.map_cl_hsp_sb_hsp_sb_rfk=1 cw_map_client_provider.map_cl_pk=b253ded9-c288-4d96-853e-ec491d07e05d 



If you get this error, verify that the length of the column chn_lg_table_name in the cw_change_log table in the change logs database is 50. If this value is less than 50, run this query on the change log causing the error.

Image

ALTER TABLE cw_change_log ALTER COLUMN chn_lg_table_name nvarchar(50) not null



Once this column has been changed, restart the SQL Server instance service and log back into CAREWare to enter the client's demographic information again.