cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

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

AO_10198547
3-Newcomer

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

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

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

9 REPLIES 9

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. 

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

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

AO_10198547_0-1716190487442.pngAO_10198547_1-1716190495517.png

 

so, what is the deferent, SP and data in Keepware 

What about the layout of the table that holds the data? I may be mistaken but I thought this error message came from Kepware ? 

AO_10198547_0-1716213096952.png

that is table "id" is increment 

Consider renaming the existing table in SQL server and having KW create a new table from that logging configuration and see if there is a different table configuration created. 

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.

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
 

Announcements


Top Tags