very new to sql lite,
I want to use it for a small project, get some overview, and try to implement but i got error while use following connection string?
Can some one please tell me what is wrong and what changes i need to do when i will set the path from web.config for sql lite connection string.
SQLiteConnection connection = new SQLiteConnection("D:\\Projects\\Apica MVC\\wizardDemo\\Apica.Signupweb.Presentation.MvcWeb\\App_Data\\SignUpWebDB");
i got an error.......
"Invalid ConnectionString format for parameter "D:\Projects\Apica MVC\wizardDemo\Apica.Signupweb.Presentation.MvcWeb\App_Data\SignUpWebDB""
There is no password set for string.
SQLiteConnection is a single connection to sqlite database. It wraps the sqlite3* database handle from SQLite C Interface. Unless otherwise specified, methods are confined to the thread that was used to open the connection.
Select SQLite from the list. Give a Connection name for your own internal reference. For Database , click Choose a File and then select the database file on your local machine to which you want to connect. Hit Connect and you're all set!
SQLite does support multiple concurrent connections, and therefore it can be used with a multi-threaded or multi-process application. The catch is that when SQLite opens a write transaction, it will lock all the tables.
Your connection string isn't correctly formatted.
You're specifying the full path and filename of the database file, but you need to ensure that you include the Data source=
part of the connection string in front of the actual database path and filename (also notice the semi-colon at the end of the connection string before the closing quote).
For example:
SQLiteConnection connection = new SQLiteConnection("Data Source=D:\\Projects\\Apica MVC\\wizardDemo\\Apica.Signupweb.Presentation.MvcWeb\\App_Data\\SignUpWebDB;");
There are more parameters that you can specify within a SQLite Connection string, see this link from the old System.Data.SQLite forums for further information. The complete documentation for the System.Data.SQLite package can be found at this page. The source code file (amongst others) contains the SQLite.NET.chm documentation file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With