- Albert van Bochove
- PowerBuilder
- Thursday, 16 November 2023 05:34 PM UTC
Hello everyone, I have a problem when I am debugging my code, it turns out that the code leads me to display an error message that I am getting after the expected error message. When I press my Search button I am getting the following error: "Invalid character value for cast specification", when really I'm expecting another error message. You can inspect my code that I execute inside my Search function:
IF THIS.inv_Payment.ids_Trans.Retrieve(THIS.is_Name,&
THIS.il_IrsCltId,&
THIS.is_Article, &
THIS.is_PayDate) > 0 THEN
// Share data with object
THIS.inv_Payment.ids_Trans.ShareData(dw_select)
// Set button
cb_Search.Default = FALSE
cb_OK.Default = TRUE
commit using sqlca;
RETURN TRUE
ELSE
gnv_App.of_Message("No matching rows found","Check the number, the client's ID or name")
cb_OK.Default = FALSE
cb_Search.Default = TRUE
commit using sqlca;
RETURN FALSE
END IF
In the first IF condition, when it does the Retrieve it is giving me an invalid casting error, but I can't see what I am doing wrong, what type of object is it waiting for, when all I am sending as an argument is a string. at can I be doing wrong? How can I fix or troubleshoot my problem?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.