What an error message...
- From: "Cyphos" <mweichert@xxxxxxxxx>
- Date: 30 Dec 2005 07:54:16 -0800
Hi Guys,
I'm stupified. I don't know what's going on here, but here's my
situation. I am just trying to learn how stored procedures work in
Pervasive. I'm doing something very simple - passing in some
parameters, and inserting a record into a table. Then the stored
procedure returns the last used identity, so that I can get the id of
the record inserted. I have the following:
CREATE PROCEDURE InsertBusiness
(
IN :BusinessName VARCHAR(35),
:ContactName VARCHAR(35),
:AddressLine1 VARCHAR(35),
:AddressLine2 VARCHAR(35)
--:CityName VARCHAR(35),
--:ZipCode VARCHAR(10),
--:State CHAR(2),
--:BusPhoneNumber VARCHAR(20),
--:HomePhoneNumber VARCHAR(20),
--:CellPhoneNumber VARCHAR(20),
--:EmailAddress VARCHAR(40)
)
RETURNS (CustomerID INT);
BEGIN
INSERT INTO CustomerIdentity VALUES(0, 'test');
SELECT @@IDENTITY;
END;
The above works great! No problem! However, as soon as I uncomment
CityName to make the stored procedure look like this:
CREATE PROCEDURE InsertBusiness
(
IN :BusinessName VARCHAR(35),
:ContactName VARCHAR(35),
:AddressLine1 VARCHAR(35),
:AddressLine2 VARCHAR(35),
:CityName VARCHAR(35)
--:ZipCode VARCHAR(10),
--:State CHAR(2),
--:BusPhoneNumber VARCHAR(20),
--:HomePhoneNumber VARCHAR(20),
--:CellPhoneNumber VARCHAR(20),
--:EmailAddress VARCHAR(40)
)
RETURNS (CustomerID INT);
BEGIN
INSERT INTO CustomerIdentity VALUES(0, 'test');
SELECT @@IDENTITY;
END;
Now, I get the following error:
A serious error occurred.
ODBC Engine is unable to supply native error code and error
description.
If any one can fix this... you're good!
.
- Follow-Ups:
- Re: What an error message...
- From: Cyphos
- Re: What an error message...
- Prev by Date: Re: BTRIEVE NTMKDE 00000081 HEX DUMP Meaning?
- Next by Date: Re: What an error message...
- Previous by thread: General Error!!!
- Next by thread: Re: What an error message...
- Index(es):