I have a problem to my stored procedure when I run my sp under my application an error msg appear and it was "Invalid character value for cast specification". Could you please help me on how to run properly my stored procedure.
Here is the script API function & SP:
DECLARE proc_login PROCEDURE FOR adduserlogin
@c_userid = :as_userid,
@c_password = :as_password,
@c_dbname = :as_dbname,
@c_rolename = :as_rolename ;
li_ret = sqlca.sqlcode
Choose Case li_ret
case 0, 100
MessageBox( "Warning", sqlca.sqlerrtext )
// Store Procedure
ALTER proc adduserlogin
, @c_password varchar(50)
, @c_dbname varchar(50)
, @c_rolename varchar(50)
Thanks for your advice, I forgot to cut & paste my error checking on the script!!! Anyway, I try your suggestion but even I put the error checking it was the same error appear "Invalid chararcter value for cast specification".
I am using my backend is MS Sql Server 7.0 and the frontend is Powebuilder. Do you think there is a conflict from ODBC SQL Driver?
Originally posted by Brett Kaiser
I meant Error checking in your stored procedure...not the script..
Did you add the:
SELECT @n_retval = @n_ret + @n_rtn
If you did, I don't see anything wrong with the sproc...I might make some of the local variables a type of sysname though.
Do you have access to SQL Server client side tools?
Test the sproc in there...it should run no problem.
If it does, you've eliminated it as the source of the problem.
Yes I put the code abovementioned to my store procedure and I have an access to SQL Server. I test the SP under Query Analyzer and it was successfully run without errors but when I put the SP inside my Apps calling the store procedure the Error msg will display "[MSSQL][ODBC SQL Driver]Invalid character value for cast specification"! What is the meaning of the given Error.