文件名称:vbaccesstotxt
-
所属分类:
- 标签属性:
- 上传时间:2014-05-05
-
文件大小:3.83kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
将Access表中的数据内容按一定格式存储到Txt文件中,D:\Program Files\Microsoft Visual Studio\VB98,如果你的VB6不是安装在此位置,请修改代码中的路径为你的实际位置,测试结束后请记着关闭数据库引擎。需要说明的地方:
输入字段名称后换行:
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
For Each fld In Data1.Recordset.Fields
Print #1, fld.Value ", "
不换行
Next
此循环将当前记录的所有字段的值写入文件
Print #1, Chr(13)
Data1.Recordset.MoveNext
输入换行符后将下一条记录设置为当前记录
Loop
此Do-While选换写入所有记录
Close #1 关闭文件
End Sub-Access to the data content stored in the table according to a certain format to Txt file, D: \ Program Files \ Microsoft Visual Studio \ VB98, if your VB6 is not installed in this location, modify the code in the path of your actual position, Remember to turn off after the end of the test database engine. Caveats: the name of the input field wrap: Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF For Each fld In Data1.Recordset.Fields Print# 1, fld.Value " ," ' No Wrap Next' This cycle values for all fields of the current record written to the file Print# 1, Chr (13) Data1.Recordset.MoveNext ' input newline after setting a record for the current record Loop' This Do-While toggle write all Record Close# 1 ' close the file End Sub
输入字段名称后换行:
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
For Each fld In Data1.Recordset.Fields
Print #1, fld.Value ", "
不换行
Next
此循环将当前记录的所有字段的值写入文件
Print #1, Chr(13)
Data1.Recordset.MoveNext
输入换行符后将下一条记录设置为当前记录
Loop
此Do-While选换写入所有记录
Close #1 关闭文件
End Sub-Access to the data content stored in the table according to a certain format to Txt file, D: \ Program Files \ Microsoft Visual Studio \ VB98, if your VB6 is not installed in this location, modify the code in the path of your actual position, Remember to turn off after the end of the test database engine. Caveats: the name of the input field wrap: Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF For Each fld In Data1.Recordset.Fields Print# 1, fld.Value " ," ' No Wrap Next' This cycle values for all fields of the current record written to the file Print# 1, Chr (13) Data1.Recordset.MoveNext ' input newline after setting a record for the current record Loop' This Do-While toggle write all Record Close# 1 ' close the file End Sub
(系统自动生成,下载前可以参看下载内容)
下载文件列表
将Access表中数据按一定格式存储到Txt文件/DataProject.vbp
将Access表中数据按一定格式存储到Txt文件/DataProject.vbw
将Access表中数据按一定格式存储到Txt文件/frmDataEnv.frm
将Access表中数据按一定格式存储到Txt文件/frmDataEnv.frx
将Access表中数据按一定格式存储到Txt文件
将Access表中数据按一定格式存储到Txt文件/DataProject.vbw
将Access表中数据按一定格式存储到Txt文件/frmDataEnv.frm
将Access表中数据按一定格式存储到Txt文件/frmDataEnv.frx
将Access表中数据按一定格式存储到Txt文件
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.