Skip to main content
3-Newcomer
May 16, 2024
Solved

i have issue by using stored procuedure "Invalid character value for cast specification"

  • May 16, 2024
  • 3 replies
  • 4274 views

i need to log data that trying to send to stored procedure that may case of issue 

Best answer by SlidingDownhill

You have to check the datatype of both and ensure they match. The SQL logs might give you some idea, not sure about that. though as it may have been checked before even attempting to send to the SQL DB.  

At some point KW added a field to their standard table creation so if you aren't populating all the fields you could get this error. 

Post your fields in KW and the ones in SQL

3 replies

12-Amethyst
May 16, 2024

CAST means that you are trying to change one datatype into another datatype. So the datatype of a value you are trying to log doesn't match the datatype of the database field that you are trying to insert it into. 

3-Newcomer
May 19, 2024

okay, how can I check data before send to Stored Procedure to avoid any issue later?

12-Amethyst
May 19, 2024

You have to check the datatype of both and ensure they match. The SQL logs might give you some idea, not sure about that. though as it may have been checked before even attempting to send to the SQL DB.  

At some point KW added a field to their standard table creation so if you aren't populating all the fields you could get this error. 

Post your fields in KW and the ones in SQL

Community Moderator
May 22, 2024

Hello @AO_10198547

 

It looks like you have some responses from a community member. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

12-Amethyst
May 27, 2024

Greetings,

Does this Post answers your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,

Mohit