使用VBScripts将数据库从Access97转换为Access 2000-2003 [英] Converting database from Access97 to Access 2000-2003 with VBScripts

查看:86
本文介绍了使用VBScripts将数据库从Access97转换为Access 2000-2003的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在切换最初在Access 97中设计的Access数据库,他们需要将其切换到Access 2000-2003数据库版本。我们在移动它(转换)时遇到了错误。我现在遇到的错误是错误3251然后将我带入一个代码窗口,该窗口指出以下内容无效并需要调试:

rst2.FindFirst" [usedfpnumber] =" &安培; varFPNum''dcr 87 5行

我检查了这个信息的来源,并且信息中包含正确的信息。 97版本中的tableinUse表具有相同的信息,并设置为2000-2003中的新数据库副本。不知道为什么我会收到这个错误以及要改变的内容。


有人可以用某种方式帮助我寻找什么吗?

I am in the process of switching an Access Database that was originally designed in Access 97 and they need it to switch over to Access 2000-2003 Database Version. We have run into errors when moving it over (converting). The error I am stuck on now is Error 3251 which then brings me into a code window that states the following is not working and needs to be debugged:
rst2.FindFirst "[usedfpnumber] = " & varFPNum ''dcr 87 5 lines
I checked the table in use where this information is coming from and it has the correct information in it. The tableinUse table from the 97 version has the same information and set up as the new database copy in 2000-2003. Not sure why I''m getting this error and what to change in it.

Can someone assist me in some way as to what to look for?

推荐答案

你打开了什么类型的记录集?向我们展示您在那里使用的代码。


找到满足指定条件的动态集或快照类型Recordset对象中的第一个,最后一个,下一个或上一个记录,并使其成为记录当前记录(仅限Microsoft Jet工作区)。


帮助文件中的示例:

设置rstCustomers = dbsNorthwind.OpenRecordset(_

" SELECT CompanyName,City,Country"& _

" FROM Customers ORDER BY CompanyName",_

dbOpenSnapshot)
What type of recordset did you open? Show us the code you are using there.

Locates the first, last, next, or previous record in a dynaset- or snapshot-type Recordset object that satisfies the specified criteria and makes that record the current record (Microsoft Jet workspaces only).


Example from the help file:
Set rstCustomers = dbsNorthwind.OpenRecordset( _
"SELECT CompanyName, City, Country " & _
"FROM Customers ORDER BY CompanyName", _
dbOpenSnapshot)



你打开了什么类型的记录集?向我们展示您在那里使用的代码。


找到满足指定条件的动态集或快照类型Recordset对象中的第一个,最后一个,下一个或上一个记录,并使其成为记录当前记录(仅限Microsoft Jet工作区)。


帮助文件中的示例:

设置rstCustomers = dbsNorthwind.OpenRecordset(_

" SELECT CompanyName,City,Country"& _

" FROM Customers ORDER BY CompanyName",_

dbOpenSnapshot)
What type of recordset did you open? Show us the code you are using there.

Locates the first, last, next, or previous record in a dynaset- or snapshot-type Recordset object that satisfies the specified criteria and makes that record the current record (Microsoft Jet workspaces only).


Example from the help file:
Set rstCustomers = dbsNorthwind.OpenRecordset( _
"SELECT CompanyName, City, Country " & _
"FROM Customers ORDER BY CompanyName", _
dbOpenSnapshot)



我现在停留的错误是错误3251然后将我带入一个代码窗口,指出以下内容无效并且需要调试:

rst2.FindFirst" [usedfpnumber] =" &安培; varFPNum''dcr 87 5行

The error I am stuck on now is Error 3251 which then brings me into a code window that states the following is not working and needs to be debugged:
rst2.FindFirst "[usedfpnumber] = " & varFPNum ''dcr 87 5 lines



我现在遇到的错误是错误3251然后将我带入一个代码窗口,指出以下是无效的,需要调试:

rst2.FindFirst" [usedfpnumber] =" &安培; varFPNum''dcr 87 5行
The error I am stuck on now is Error 3251 which then brings me into a code window that states the following is not working and needs to be debugged:
rst2.FindFirst "[usedfpnumber] = " & varFPNum ''dcr 87 5 lines



我得到了这个我需要更多的代码/信息,如果我要提供帮助的话。有几个问题可能会导致这种情况。


我会采取刺痛措施。

在你的宣言部分,你会看到类似的内容:


Dim db as database

Dim rst2作为记录集


如果您尝试将其更改为:

Dim rst2作为Dao.recordset


我很确定Dao是默认值,但可能取决于你的参考顺序。


另一件可能导致这种情况的事情就是根据我发布的帮助文件评论将记录集声明为快照或动态集以外的其他内容


I got this I need more code/info if I am going to help. There are several issue that can cause this.

I will take a stab though.
In your Declaration section do you see something like this:

Dim db as database
Dim rst2 as recordset

If you do try changing it to read:
Dim rst2 as Dao.recordset

I am pretty sure Dao is the default but it might depend on the order of your references.

Another thing that could cause this is declaring the recordset to something other than a snapshot or dynaset as per the help file comment that I posted

展开 | 选择 | Wrap | 行号


这篇关于使用VBScripts将数据库从Access97转换为Access 2000-2003的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆