Sqlite connecting to remote file using url C# -


ive been trying sqlite read remote file flatout tells me isnt supported there workaround ?

here function gives error

    public void run(string sql,string check,string file)       {         sqliteconnection m_dbconnection;         string test = "data source=" + file + ";version=3;";         m_dbconnection = new sqliteconnection(test);         m_dbconnection.open();         sqlitecommand command = new sqlitecommand(sql, m_dbconnection);         sqlitedatareader reader = command.executereader();         if (check == "0")         {             while (reader.read())                 combobox1.items.add(reader["name"] + "." + reader["tld"]);             combobox1.selectedindex = 0;         }         else         {            proxy = reader["proxyip"].tostring();            check = "0";         }     } 

error "uri formats not supported"

the file variable filled 1 of 2 values.

 string filelocal = environment.getfolderpath(environment.specialfolder.programfiles) + "\\unblocker\\sites.db"; 

or

  string remotefile = "http://127.0.0.1/test.db"; 

the 1 gives error remote file.

the connection string uses datasource db file expected on local file system, take @ example code.

you can transorfm using:

uri uriformatted = new uri(file); uriformatted.absolutepath; // try use value instead call function 

edit

sqlite local standalone database, used standalone software

consider using sqlitening:

sqlitening client/server implementation of popular sqlite database.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -