Problem with Nullable fields?
Posted: Wed 15 Apr 2009 13:51
Hi,
I am having real trouble getting even a simple table to behave here, I feel I'm missing something fairly fundamental!
I have created a single table within Oracle with which I am testing the Linq capabilities of dotConnect for Oracle. The table has an autoincrement column (via sequence and trigger), 2 non-null fields and 2 nullable fields. I am able to retrieve a row using:
but no matter what is in the table, the nullable fields always come back as Nothing, and likewise if I try to give one a value using the below, the first line has no effect and the field is still Nothing, even after SubmitChanges:
Also, for non-null fields, it does allow me to change the value but then throws a Concurrency exception when I run SubmitChanges().
I also get Concurrency exceptions when I try to Delete a row.
Inserting new rows works without error but for some reason inserts 2 rows every time, and Nullable fields do not get the value that I give them in code.
This has had me stumped for some time now, I'm sure it must be something obvious that I'm just missing.
Ross
I am having real trouble getting even a simple table to behave here, I feel I'm missing something fairly fundamental!
I have created a single table within Oracle with which I am testing the Linq capabilities of dotConnect for Oracle. The table has an autoincrement column (via sequence and trigger), 2 non-null fields and 2 nullable fields. I am able to retrieve a row using:
Code: Select all
Dim odb As New OracleData.OracleDataContext
Dim jn As OracleData.JOB_NODE = odb.JOB_NODEs.First(Function(j) j.NODEID = 1)
Code: Select all
jn.PERSONID = 3
odb.SubmitChanges()
I also get Concurrency exceptions when I try to Delete a row.
Inserting new rows works without error but for some reason inserts 2 rows every time, and Nullable fields do not get the value that I give them in code.
This has had me stumped for some time now, I'm sure it must be something obvious that I'm just missing.
Ross