Replies: 3 comments 1 reply
-
I think I could allow you to provide me with a SqliteConnection instead of my opening one directly. That would mean you would be responsible for the lifetime of the SqliteConnection, but it also means you can initialize the SQLite driver once and then open both databases prior to initializing the SqliteOfflineStore. Would that work for you? |
Beta Was this translation helpful? Give feedback.
-
What is your client side platform (Android, iOS, UWP, WPF)? It sounds similar to a problem I ran into in our WPF client when the SQLite PCL configured by another SQLite connection first (before DatasyncClient): #577
|
Beta Was this translation helpful? Give feedback.
-
I spent some time on this today. I was letting my dependency injection create the instance of both my SQLite database (used independently) and my AzureMobileClient (which uses the datasync client). The creation of the independent SQLite database was happening first which would cause the datasync client to fail with a 14 result code from the open. I rearranged my code to allow the AzureMobileClient to be opened prior to attempting to open my other SQLite database and now everything works. I let is create an instance of my SQLite service, but I don't attempt to open a connection to that database until when it is first used - basically delaying the open and now everything works correctly. I think others will have the same issue if they attempt to open SQLite prior to the connection using the datasync.client Thanks for pointing me to your issue above, that was the clue to getting it to work. Alan |
Beta Was this translation helpful? Give feedback.
-
I ran into this problem several months ago. I use a local SQLite database in my application as well as the datasync client. I have found that if I open my local SQLite database prior to the call to my Azure mobile client, the open will fail with the other SQLite database. I have reversed the open order and it is consistent. The first database opens, the second fails. The call to the SqliteConnection - specifically raw.sqlite3_open returns an error code 14. Adrian and I looked at this in the past and thought the initialize had an issue with the 2nd database. Has anyone else encountered the issue? I temporarily switched to writing the information in a JSON file on the device, but would really like to use SQLite instead. Ideas?
Thanks
Alan
Beta Was this translation helpful? Give feedback.
All reactions