in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Parameter for foreign key support in the connection string?

Last post 09-21-2010 7:39 AM by senglory. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-15-2010 5:30 AM

    Parameter for foreign key support in the connection string?

    Hi, I'm interested in turning on the foreign key support when connecting to the database. I know that it is "pragma foreign_keys = ON" but it doesn't work in the connection string...

    Moreover it doesn't work if I try to turn on later:
            cmd.CommandText = "PRAGMA foreign_keys=ON"
            cmd.ExecuteNonQuery()
    - it still doesn't force referential integrity for further SQLiteCommands.

    Can you please also point a document that describes the possible parameters that can be used in the connection string?

     

    Thanks, Tamas

  • 01-15-2010 7:40 AM In reply to

    Re: Parameter for foreign key support in the connection string?

    That code is in process, but I haven't finished it yet.  It'll be in the connection string, "EnforceFKConstraints" and will accept Yes, No, True, False, 1, 0.  It will default to False.

  • 01-15-2010 8:18 AM In reply to

    Re: Parameter for foreign key support in the connection string?

    Thanks for the info. So if I understand well, currently there's no (other) way to turn it on from .NET?

  • 09-21-2010 7:39 AM In reply to

    Re: Parameter for foreign key support in the connection string?

    How is support for foreign key constraints and cascade updates going now? Did you implement it in your April release?

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems