我下载了
System.Data.SQLite,并尝试编译以下示例代码.
原文链接:https://www.f2er.com/sqlite/453029.htmlusing System; using System.Data; using System.Data.Common; using System.Data.sqlite; namespace test { class Program { static void Main(string[] args) { sqliteConnection.CreateFile("/Users/smcho/Desktop/sqlite-1/example/mydatabasefile.db3"); } } }
我运行了以下命令
mcs db.cs -r:System.Data.dll -r:System.Data.sqlite.dll
但是,我收到如下错误消息.
** (/opt/local/lib/mono/1.0/mcs.exe:43249): WARNING **: The class System.Data.Common.DbConnection could not be loaded,used in System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089 db.cs(12,7): error CS0103: The name `sqliteConnection' does not exist in the current context Compilation Failed: 1 error(s),0 warnings
可能有什么问题?