我一直在我的 Java 和 C# 应用程序中使用 SQLite,使用 C# 的System.Data.SQLite库和 Java 的Zentus SQLiteJDBC 驱动程序。
我注意到 Java 实现允许使用默认 Java 安装中包含的现成 SQL 库,而 C# 实现必须使用 C# 等效的特定 SQLite 版本。
例子:
C#
SQLiteConnection connection = null;
SQLiteCommand command = null;
SQLiteDataReader dReader = null;
float[] _data;
try
{
connection = new SQLiteConnection(_connectionString);
connection.Open();
爪哇
Connection connection = null;
PreparedStatement ps = null;
ResultSet rs = null;
float _data[];
try
{
connection = DriverManager.getConnection(_connectionString);
Statement st = connection.createStatement();
这取决于 SQL 数据库在语言中的使用方式,还是由于库的实现,我有兴趣了解更多关于导致它们使用的细节。