简体   繁体   English

无法识别的数据库格式vb6?

[英]Unrecognizable database format vb6?

I am trying to open up a database to read values and input into a list view. 我正在尝试打开一个数据库以读取值并将其输入到列表视图中。 When I open the form containing the database initialization it gives me the error Unrecognizable database format and then displays my database location string. 当我打开包含数据库初始化的表单时,它给我错误Unrecognizable database format ,然后显示我的数据库位置字符串。 This is how I'm connecting to the database right now, 这就是我现在连接数据库的方式,

Dim dbcasegoods As Database
Dim rscasegoods As Recordset
Dim strdatabase As String

Private Sub Form_Load()
   strdatabase = ("I:\Casegoods\database\ContractCasegoods.mdb")
   Set dbcasegoods = OpenDatabase(strdatabase, False)

End Sub

The part that I don't understand is that I've used this method to connect to a database before, in the same project even, and I've used this database today in a different project. 我不了解的部分是,即使在同一项目中,我也曾经使用此方法连接到数据库,而今天,我在另一个项目中使用了此数据库。

VB6 (aka VB98) only works with certain Access formats (up to Access97 by default, if I recall). VB6(又名VB98)仅适用于某些Access格式(如果我记得的话,默认为Access97)。 This can be extended to Access 2000/2002 with SP6. 这可以扩展到带有SP6的Access 2000/2002。

But many of the post Access 2000 versions (at least to 2003) allow you to create MDB in 1997 format because VB6 just wont go away. 但是许多Access 2000后的版本(至少到2003年为止)允许您以1997格式创建MDB,因为VB6不会消失。 The title bar of the DB object window may display the format (eg dbname DataBAse (Access 2000 file format) ). DB对象窗口的标题栏可以显示格式(例如dbname DataBAse (Access 2000 file format) )。 I dont know how similar the menu will be in 2007, but 我不知道菜单在2007年会有多类似,但是

Tools -> ConvertDatabase -> 97 | 工具-> ConvertDatabase-> 97 | 2000 | 2000 | 2002-2003 formats 2002-2003格式

allows you to convert to various formats. 允许您转换为各种格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM