Hi everyone,
i have generated the stored procedures and metadatamap for Oracle with MyGen 1.3 after converting every table from MsSQL to Oracle. Im now getting an "OCI-22060" Error:
"OCI-22060: argument [2] is an invalid or uninitialized number". The only number in this specific table is the ID-Column, which is primary key and identity column.
MetadataMap, relevant part:
Code:
meta.AddTypeMap("ID", new esTypeMap("NUMBER", "System.Decimal"));
meta.AddTypeMap("Name", new esTypeMap("NVARCHAR2", "System.String"));
Stored procedure:
Code:
1 create or replace PROCEDURE "ViewTypesInsert"
2 (
3 pID IN "ViewTypes"."ID"%type,
4 pName IN "ViewTypes"."Name"%type
5 )
6 IS
7 BEGIN
8
9
10 INSERT
11 INTO "ViewTypes"
12 (
13 "ID",
14 "Name"
15 )
16 VALUES
17 (
18 pID,
19 pName
20 );
21 END ;
Table Create:
Code:
1 CREATE TABLE "ViewTypes"
2 ( "ID" NUMBER(10,0) NOT NULL ENABLE,
3 "Name" NVARCHAR2(100) NOT NULL ENABLE,
4 CONSTRAINT "PK_VIEWTYPES" PRIMARY KEY ("ID") ENABLE
5 )
6 /
7
8 CREATE OR REPLACE TRIGGER "VIEWTYPES_ID_TRG" BEFORE INSERT OR UPDATE ON "ViewTypes"
9 FOR EACH ROW
10 BEGIN
11 if inserting and :new.ID is NULL then
12 SELECT ViewTypes_ID_SEQ.nextval into :new.ID FROM DUAL;
13 end if;
14 END;
15
16
17 /
18 ALTER TRIGGER "VIEWTYPES_ID_TRG" ENABLE
19 /
20
C# Code:
Code:
1 ViewTypes vt = new ViewTypes();
2 vt.AddNew();
3 vt.Name = "CablePlan";
4 vt.Save();
This is the simplest table i have, the problem occurs on every other table, too. Im still not very familiar with Oracle, so every idea is appreciated.
Edit: Changing the type to "System.Int32" does not change anything.
Thanks,
Joris