vb6中怎样打印数据中的记录
时间:2011-12-01
来源:互联网
请问各位大侠一下,有一个数据库,
Call OpenCNN(Cnn)
SQL = "select * from username where 学号=" & Text1.Text
RSt.Open SQL, Cnn, adOpenStatic, adLockBatchOptimistic
数据库字段:
学号 姓名 性别 系别 年级 入学时间
11122 李平 男 计算机 一 2011-11-20
因为学号是唯一的,所以,要打印这条记录,RSt
请问怎么样才能方便一点的打印出来,不需要什么格式
学号:11122 姓名:李平 性别:男
系别:计算机 年级: 一 入学时间:2011-11-20
就按这样,怎么简单一点阿。
最好有点代码给解释一下,谢谢~!
Call OpenCNN(Cnn)
SQL = "select * from username where 学号=" & Text1.Text
RSt.Open SQL, Cnn, adOpenStatic, adLockBatchOptimistic
数据库字段:
学号 姓名 性别 系别 年级 入学时间
11122 李平 男 计算机 一 2011-11-20
因为学号是唯一的,所以,要打印这条记录,RSt
请问怎么样才能方便一点的打印出来,不需要什么格式
学号:11122 姓名:李平 性别:男
系别:计算机 年级: 一 入学时间:2011-11-20
就按这样,怎么简单一点阿。
最好有点代码给解释一下,谢谢~!
作者: xtyuao 发布时间: 2011-12-01
sub command1_click
dim fld as adodb.field
with rst
if .recordcount>0 then
.movefirst
while not .eof
for each fld in .fields
if not isnull(fld) then
printer.print cstr(fld);
end if
next
printer.print
.movenext
wend
end if
end with
printer.enddoc
end sub
dim fld as adodb.field
with rst
if .recordcount>0 then
.movefirst
while not .eof
for each fld in .fields
if not isnull(fld) then
printer.print cstr(fld);
end if
next
printer.print
.movenext
wend
end if
end with
printer.enddoc
end sub
作者: worldy 发布时间: 2011-12-01
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28