Applies to:
PcVue 16 |
||
Summary:
SQLite is probably one of the most used database engine. But SQLite editor does no more share installer (.msi). To be detected by PcVue, each ADO.NET provider must be installed in the Global Assembly Cache (GAC) of the .NET framework and referenced in the machine.config file. The ProviderInstaller tool facilitates this task. |
||
Details:
A – How to install SQLite ADO.NET Provider
1. Download SQLite Precompiled Binaries for .NET system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki 2. Extract archive and identify following files: 3. Download Attachment “ProviderInstaller – SQLite.zip“ 4. Extract “ProviderInstaller – SQLite.zip” to “ProviderInstaller – SQLite” 5. Replace following files in folder “ProviderInstaller – SQLite” by the version downloaded at step 1. 6. Open CMD prompt as Administrator 7. Change “ProviderInstaller – SQLite” directory cd "%USERPROFILE%\Download\ProviderInstaller - SQLite"
8. Run following command: ProviderInstaller.exe /install
The installation is complete !! B – Data Source connection string
On PcVue side (Application Explorer), you must declare an “Other providers” data source: To enter the connection string, you must select the second tab (Other). – Connection string without password: Data Source=C:\mydb.db;Version=3;
– Connection string with password: Data Source=C:\mydb.db;Version=3;Password=MySecret;
– In-memory database: Data Source=:memory:;Version=3;New=True;
Found more examples here C – Data Source Sql queries
On PcVue side (Application Explorer), you can add Sql queries to data connections you created: You will find below some SQL queries examples. – Create a table CREATE TABLE [MyTable] (col1 INTEGER NOT NULL)
– Insert a value INSERT INTO [MyTable] (col1) VALUES (1)
– Display table content SELECT * FROM [MyTable]
Found more samples here D – Troubleshooting
Test connection failed in SqlConnection "Unable to open database file"
Check database full path is valid. "Exception has been thrown by the target of an invocation."
Check you deploy x86 DLL (System.Data.SQLite.dll / SQLite.Interop.dll) in GAC folder and not x64 DLL. Download attachments: ProviderInstaller – SQLite.zip |
||
|
Created on: 02 Feb 2024 Last update: 07 Feb 2025