A typical connection string for SQLite would be something like:
Data Source=test.db;Version=3;
I have seen similar questions (like this one) on parsing connection string and they generally end up saying to use SqlConnectionStringBuilder (I'm obviously on .Net). This seems to be a great option for most strings, but it will not work for SQLite. It throw an exception "Keyword not supported:'version'".
I am thinking Regex may be the only option here, but does anyone know if there are there any other options? I'd love to get the Regex expression for getting Data Source as well.
Aucun commentaire:
Enregistrer un commentaire