Hi guys
I using the following Stored procedure to insert and update for one table.
create procedure spUsersAndCompanies
(
Operationtype char(1),
UsersAndCompaniesId int,
UserId int,
CompanyId int,
PositionId int
)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
AS
Begin
If (OperationType = 'I')then
Begin
INSERT INTO
UsersAndCompanies
(
UsersAndCompaniesId,
UserId,
CompanyId,
PositionId
)
VALUES (
S_UsersAndCompanies.nextval,
:UserId,
:CompanyId,
:PositionId
);
End;
Else if (OperationType = 'U') then
Begin
UPDATE
UsersAndCompanies
SET
UserId= :UserId,
CompanyId= :CompanyId,
PositionId= :PositionId
WHERE
UsersAndCompaniesId = :UsersAndCompaniesId;
End;
end if;
end if;
end;
for insert I call the SP with null value for UsersAndCompaniesId because this is auto incremented column.
the problem when I call the SP For insert I get the following error
feature not supported: feature not supported: insert NULL value for UsersAndCompaniesId
can someone please help me to solve it .
Regard's
Bassam