Problem with INSERT!

Jun 5, 2009 at 7:47 PM

Hello,

I just started using this LINQ to Oracle from yesterday and the Select, Update and delete works fine right away. But I  have problem with the INSERT.

The Mapping I am using is

 [Column(Storage = "_WebUserID", DBType = "NUMBER NOT NULL IDENTITY", Id=true,AutoGen=true)]
        public int WebUserID
        {
            get
            {
                return this._WebUserID;
            }
            set
            {
                if ((this._WebUserID != value))
                {
                    this.OnPropertyChanging("WebUserID");
                    this._WebUserID = value;
                    this.OnPropertyChanged("WebUserID");                
                }
            }
        }

and getting the follwoing error:

ORA-06550: line 1, column 120:
PLS-00487: Invalid reference to variable 'IDENTITY'
ORA-06550: line 1, column 120:
PL/SQL: ORA-02289: sequence does not exist
ORA-06550: line 1, column 113:
PL/SQL: SQL Statement ignored

 

In some cases it's adding an ID with a value of "0".

Any help would be greatly apprecaited.

Thanks

A

 

 

 

Jun 5, 2009 at 9:24 PM

Fixed it by adding the Sequence in the mapping.