Hi,
We are trying to use executestoredprocedure for a procedure written in SQL server.
The procedure takes 2 parameters of type 'bigint' and executes successfully within the database client but it fails to execute stating 'cannot convert nvarchar to bigint'.
Any idea how to bypass this issue?
Discussion posts and replies are publicly visible
Hi TJ, is the data type you are passing to the procedure by Appian text/nvarchar? My guess is that you would like to pass a large integer value from Appian to the DB which is defined as text in Appian? We might have to adjust the procedure to expect nvarchar if this is the case, although I have not run into this issue myself.
I agree with Chris. The data type of all the inputs of the stored procedure should map with the one's that are sent from Appian. Like in this case Text value is passed from Appian whereas procedure expects a BIGINT and it is unable to type cast internally. Take a look at this table which provides mapping between Appian and various database column types (under Field types section) - Appian mapping with Database column types
I would try using / converting the value to a Number(Decimal) before passing it to the stored procedure since BIGINT from SQL server maps to Number(Decimal) in Appian.