C# 打开 Borland database 数据文件( .db 文件)
如题 C# 打开 Borland database 数据文件( .db 文件)?
具体怎么连接 怎么读取数??
borland
c#
database
------解决方案--------------------string ConnectionString = @"Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:Paradox;Dbq=C:Paradox;CollatingSequence=ASCII;PWD=;";
using (System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection(ConnectionString))
...{
conn.Open();
using (System.Data.Odbc.OdbcCommand command = conn.CreateCommand())
...{
command.CommandText = " update test set aa=14";
command.ExecuteNonQuery();
command.CommandText = "select * from test";
Console.WriteLine(command.ExecuteScalar());
}
}