skizdigidy
Programmer
Hello Everyone,
I'm fairly new to Pervasive SQL and SQL in general I guess. I'm a VB.NET programmer. We use Pervasive for our ERP server at my workplace. The Pervasive Control Center is version 8.70.014.000. I'm trying to create some stored procedures for an application I'm working on. For the life of me, I cannot seem to get the thing to work. I keep getting the following error:
ODBC Error: SQLSTATE = S1000, Native error code = 0
Incompatible types in expression.
This is my code for the stored procedure:
CREATE PROCEDURE P_SRC_GetParent(IN arentNumber CHAR(20));
BEGIN
SELECT ROUTER
FROM ROUTER_HEADER
WHERE ROUTER = arentNumber;
END;
Pretty simple right? You'd think so anyways.
The datatype for ROUTER in table ROUTER_HEADER is CHAR(20). I've tried using the CONVERT function in various ways and I cannot seem to get any output. If I hard code a value in place of arentNumber I can get output. So it's definitely something with my parameter and its data type.
If someone could please help me I'd greatly appreciate.
I'm fairly new to Pervasive SQL and SQL in general I guess. I'm a VB.NET programmer. We use Pervasive for our ERP server at my workplace. The Pervasive Control Center is version 8.70.014.000. I'm trying to create some stored procedures for an application I'm working on. For the life of me, I cannot seem to get the thing to work. I keep getting the following error:
ODBC Error: SQLSTATE = S1000, Native error code = 0
Incompatible types in expression.
This is my code for the stored procedure:
CREATE PROCEDURE P_SRC_GetParent(IN arentNumber CHAR(20));
BEGIN
SELECT ROUTER
FROM ROUTER_HEADER
WHERE ROUTER = arentNumber;
END;
Pretty simple right? You'd think so anyways.
The datatype for ROUTER in table ROUTER_HEADER is CHAR(20). I've tried using the CONVERT function in various ways and I cannot seem to get any output. If I hard code a value in place of arentNumber I can get output. So it's definitely something with my parameter and its data type.
If someone could please help me I'd greatly appreciate.