【发布时间】:2011-08-19 19:49:10
【问题描述】:
我一直在我的 Java 和 C# 应用程序中使用 SQLite,在 C# 中使用 System.Data.SQLite 库,在 Java 中使用 Zentus SQLiteJDBC Driver。
我注意到 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();
Java
Connection connection = null;
PreparedStatement ps = null;
ResultSet rs = null;
float _data[];
try
{
connection = DriverManager.getConnection(_connectionString);
Statement st = connection.createStatement();
这取决于 SQL 数据库在语言中的使用方式,还是由于库的实现,我有兴趣了解更多关于导致它们使用的细节。
【问题讨论】:
标签: c# java sqlite system.data.sqlite sqlitejdbc