Using table definitions without foreign key check

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
chris185
Posts: 3
Joined: Tue 07 Apr 2020 21:38

Using table definitions without foreign key check

Post by chris185 » Mon 30 Nov 2020 22:41

Hi,

I have an App which runs in 2 modes, 1 mode is database mode where the App connects to an database. 2. is standalone mode where i want to store the same data locally as lists in files. When i use standalone mode i want to reuse the database objects, but the problem is that the data will not be populated correct. The foreign key constraint seems to avoid that the data will be filled up. Can i disable foreign key checks without connecting to the database ?

Sincerly
Christoph Weller

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Using table definitions without foreign key check

Post by Shalex » Sat 12 Dec 2020 16:12

You are using MySqlDataSet in standalone mode, aren't you? Try setting MySqlDataSet.EnforceConstraints=false. If this is not the case, send us a small test project so that we can reproduce the issue you have encountered.

Post Reply