I am using dotConnect for mySQL 18.104.22.168
In my database, I have two tables, related to each other with an Foreign-Key Reference
Code: Select all
- THIS IS TABLE AUFTRAGDETAILS - CONSTRAINT `rel_AuftragDetails_Artikelstamm` FOREIGN KEY (`artikelid`) REFERENCES `artikelstamm`(ID) ON DELETE SET NULL ON UPDATE CASCADE
By code, I want to add an article, which is not in the parent table. So the ID field has to be NULL.
But I can't give my ID field the value NULL, because the ID field has a type of LONG. And DBNULL.Value can't be set to a value which type is LONG. Also NOTHING is not working, because then has the field a value of 0 and then I get an error from the Server, because I don't hav an article which has 0 as it's ID field.
So the main question now is: How can I set a field which DataType is LONG to DBNULL.Value?