在Linux中,使用SMB查询MDB(MS Access)文件的最简单选项是什么?

huangapple go评论73阅读模式
英文:

Easiest option to query mdb (ms access) file using smb in Linux

问题

在我的工作场所,考勤(指纹)设备使用存储在Windows PC上的.mdb文件,并且我有一个smb账户连接到该计算机的网络共享smb://10.7.7.x/tas/,共享文件夹中包含3个文件:

 HITFPTA.ldb
 HITFPTA.mdb ==> 这个文件
 HITFPTA_History.mdb

在我们的服务器上(使用Linux操作系统,具体是ArchLinux),有什么最简单的方法可以实时查询该文件?(如果可能的话,使用Go编程语言)

英文:

In my workplace the attendance (fingerprint) device uses .mdb file (that stored on Windows PC), and I have a smb account to the network share to that computer smb://10.7.7.x/tas/, inside the share folder contains 3 files:

 HITFPTA.ldb
 HITFPTA.mdb ==> this one
 HITFPTA_History.mdb

What are the easiest option to able to query (in real time) from that file, since our server that should do the query uses Linux (ArchLinux)? (if possible using Go programming language)

答案1

得分: 1

对于从Windows和非Windows客户端对“live” .mdb数据库进行只读访问,我建议使用Java和UCanAccess JDBC驱动程序(详细信息请参见这里)。如果您不喜欢编写Java代码,但对Python有一些了解,那么您可以使用Jython,如我在这里的另一个答案中所述。

(UCanAccess使用的数据访问层Jackcess不使用Access数据库引擎,也不打算对多用户数据库进行更新。但是,它应该能够无事故地读取数据库。为了报告目的,最好复制.mdb文件并针对副本运行报告。或者,坚持使用Windows客户端并使用ODBC。)

英文:

For read-only access to a "live" .mdb database from a mix of Windows and non-Windows clients I would recommend using Java and the UCanAccess JDBC driver (details here). If you're not keen on writing Java code but have some familiarity with Python then you could use Jython as described in my other answer here.

(Jackcess, the data-access layer used by UCanAccess, does not use the Access Database Engine and is not intended to make updates to a live multi-user database. However, it should be able to read the database without incident. For reporting purposes it might be prudent to take a copy of the .mdb file and run the reports against that. Or, stick with Windows clients and use ODBC.)

huangapple
  • 本文由 发表于 2014年11月26日 17:57:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/27146070.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定