i’m inserting a record but i received and error.
CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1741 OCIStmtPrepare: ORA-01741: illegal zero-length identifier
(ext\pdo_oci\oci_driver.c:279)
the primary key is based on sequence…
CREATE TABLE "ADMIN"."BK_R_BOOK_103"
( "BOOK_UID" NUMBER(18,0) primary key,
"DESCRIPTION" VARCHAR2(100),
"PURPOSE" VARCHAR2(200)
);
CREATE OR REPLACE TRIGGER "ADMIN"."BK_R_BOOK_103_TRIG"
before insert on "ADMIN"."BK_R_BOOK_103"
for each row
begin
if inserting then
if :NEW."BOOK_UID" is null then
select BK_R_BOOK_103_SEQ.nextval into :NEW."BOOK_UID" from dual;
end if;
end if;
end;
originally, i dont intend to use sequence but after creating the crud for my table, there is no textbox for my primary key.
hope you can help me with this.
thanks.
god bless