I am having some difficulty coming up with a clean design for inserting new records into an oracle database using VS 2008, Datasets and the TableAdapterManager. The Primary Key of the Oracle table is ID and is defined as a number. My original intention was to create a Before Insert trigger on the table that would replace a Null Id before insert with the sequence.nextval. However I could not seem to get past the AllowDBNull = false, even though I would set it to true via the DataSet designer. I also tried to remove the ID field from the Insert Statement, but was still getting null issues.
I ended up adding code to the TableNewRow event to get the ID from the oracle sequence, but was wondering if there was something that I was missing which was causing the allow null errors during the Validate or EndEdit functions, even when I tried setting AllowDBNull = True.
Any help or advice would be greatly appreciated.
I ended up adding code to the TableNewRow event to get the ID from the oracle sequence, but was wondering if there was something that I was missing which was causing the allow null errors during the Validate or EndEdit functions, even when I tried setting AllowDBNull = True.
Any help or advice would be greatly appreciated.