看看这一段代码帮帮忙。

succed 2003-02-28 01:21:54
Type PersonsInformation
Name as string*10
Address as string*40
Age as integer
Ses as string*2
End Type
dim Employees as PersonsInformation
RecordLength as Long
RecordLength = Len(Employees)
Open "d:\test.mdb" for Radom as #1 len=RecordLength
程序每执行到这一段就说类型不匹配或模块不能编译,不知为什么?我的代码并不错阿。
...全文
82 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Matthewzhong 2003-03-04
  • 打赏
  • 举报
回复
up
j_x_y 2003-03-01
  • 打赏
  • 举报
回复
Type PersonsInformation
Name as string*10
Address as string*40
Age as integer
Ses as string*2
End Type
dim Employees as PersonsInformation
Dim RecordLength as Long ''这里少了一个 Dim
RecordLength = Len(Employees)
Open "d:\test.mdb" for Binary as #1
xiaoxinghappy 2003-03-01
  • 打赏
  • 举报
回复
Type PersonsInformation
Name as string*10
Address as string*40
Age as integer
Ses as string*2
End Type
dim Employees as PersonsInformation
Dim RecordLength as Long ''这里少了一个 Dim
RecordLength = Len(Employees)
Open "d:\test.mdb" for Binary as #1
griefforyou 2003-03-01
  • 打赏
  • 举报
回复
griefforyou 2003-03-01
  • 打赏
  • 举报
回复
RecordLength
是个变理哟
succed 2003-03-01
  • 打赏
  • 举报
回复
for random, 我发问题的时候少了一个字母,但我的程序里并不少,不知为什么总提示类型未定义,原dest.mdb不存在,用上面的方式打开时应该能建立新文件才对。
northwolves 2003-02-28
  • 打赏
  • 举报
回复

try:
Open "d:\test.mdb" for Random as #1 len=RecordLength

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧