Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/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
Iphone 我可以连接到远程sqlite二进制转储文件吗?_Iphone_Ipad_Sqlite_Mysqldump - Fatal编程技术网

Iphone 我可以连接到远程sqlite二进制转储文件吗?

Iphone 我可以连接到远程sqlite二进制转储文件吗?,iphone,ipad,sqlite,mysqldump,Iphone,Ipad,Sqlite,Mysqldump,我尝试连接到远程sqlite文件,当我尝试打开该文件时,我收到一个错误: if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { ... }else { // Even though the open failed, call close to properly clean up resources. sqlite3_close(database); NSAssert1(0,

我尝试连接到远程sqlite文件,当我尝试打开该文件时,我收到一个错误:

if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {

...

}else {
    // Even though the open failed, call close to properly clean up resources.
    sqlite3_close(database);
    NSAssert1(0, @"Failed to open database with message '%s'.", sqlite3_errmsg(database));
    // Additional error handling, as appropriate...
}
当我试图输出数据库路径时,它给出了正确的url,这是一个本地网络设置,应用程序连接到一个静态ip,搜索二进制sqlite转储

2010-04-27 12:47:43.017 bbc_v1[4904:207]加载数据库路径:

已测试,并且文件存在

是否可以连接到远程sqlite文件?还是只有在应用程序包中才有可能实现


欢迎,Thomas

sqlite3\u open接受文件名,而不是URL

我认为sqlite不提供任何远程访问,因为它是为嵌入式使用而明确设计的


您应该下载文件并将其保存在设备上,然后打开它。

您不想打开应用程序包中的SQL文件。你只能读,不能写。通常,您会在第一次启动时将DB从应用程序包复制到Documents目录,然后从那里打开它。