Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何从WindowsApplicationSQLite数据库连接_C#_Asp.net_Sqlite_Host - Fatal编程技术网

C# 如何从WindowsApplicationSQLite数据库连接

C# 如何从WindowsApplicationSQLite数据库连接,c#,asp.net,sqlite,host,C#,Asp.net,Sqlite,Host,我有一个用C#编写的Windows应用程序,使用Sqlite3作为其数据库。我想用我的Windows应用程序数据库更新主机中的数据库。您可以使用以下代码连接到SQLite3数据库 SQLiteConnection db = new SQLiteConnection("Data Source=/path/to/file.db;Version=3;"); db.Open(); 如果要指定其他连接参数,则始终是一个很好的资源。另外,您可以查看与您的类似的数据库。我想将数据发送到主机中的数据库;我认为

我有一个用C#编写的Windows应用程序,使用Sqlite3作为其数据库。我想用我的Windows应用程序数据库更新主机中的数据库。

您可以使用以下代码连接到SQLite3数据库

SQLiteConnection db = new SQLiteConnection("Data Source=/path/to/file.db;Version=3;");
db.Open();

如果要指定其他连接参数,则始终是一个很好的资源。另外,您可以查看与您的类似的数据库。

我想将数据发送到主机中的数据库;我认为首先必须由主机创建一个证书文件或授权,然后才能连接到主机中的数据库;SQLite是一个嵌入式数据库系统,这意味着您必须像访问本地资源一样访问它。如果数据库存在于运行应用程序的同一台计算机上,那么只需指定SQLite数据库的路径和文件名即可。如果数据库存在于远程系统上,则需要某种文件共享过程。在Windows上,您可以在远程系统上设置文件共享,然后将驱动器映射到本地系统上的文件共享。