sqlite pragma forex_keys 질문
-
22-07-2019 - |
해결책
이 문제를 해결하기 위해 SqliteConnection 클래스의 ConnectionString에 '외국 키'속성을 추가했습니다.
외국 키 = 외부 키 = OFF
다른 팁
System.data.sqlite 최신 버전의 SQLITE를 사용하려면 System.Data.sqlite의 ManagedOnly 버전을 사용한 다음 SQLite3.dll을 최신 버전으로 만 바꾸면됩니다. 외국 키 지원을 활성화하기 위해 외국 키 지원을 가능하게하는 SQL 문을 실행합니다. 예를 들어
string databasePath = "Your database path here";
string connectionString = "Data Source=" + databasePath;
connection = new SQLiteConnection(connectionString);
connection.Open();
const string sqlString = "PRAGMA foreign_keys = ON;";
SQLiteCommand command = new SQLiteCommand(sqlString, connection);
command.ExecuteNonQuery();
제휴하지 않습니다 StackOverflow