vb6+Access
数据库中数据是从文本文件中导入的,各字段均为字符串型,但一般都是象"457,994.98" "0.00"这样的
BlcChng = Val(TextBlcChng.Text) * 10000 'BlcChng 为双精 取自一个textbox的值
QryStr = "Select CusAccNum,CusAccNam," & FieldName(1) & "," & FieldName(2) & "," & " Cdbl(" & FieldName(2) & " - " & FieldName(1) & ") From CusAccBlc where "
QryStr = GenaQryStr & " ABS(Cdbl(" & FieldName(2) & " - " & FieldName(1) & " )) > " & BlcChng 'QryStr为查询字符串,FieldName(1)和FieldName(2)为记录字段名的字符串变量 DB_Connect '连接函数
Set rs = QueryExt(QryStr) '查询函数
If Not rs.EOF Then
LblTip.Caption = "变动大于" & BlcChng / 10000 & "万元的账户"
rs.MoveFirst
While Not rs.EOF
Text5.Text = rs.Fields(1)
If IsNull(rs.Fields(0)) Then Text.Text = "null" '<--- 这4行是我作测试的
If IsNull(rs.Fields(1)) Then Text1.Text = "null" '我按F8循环几次后出现这样的错误提示:
If IsNull(rs.Fields(2)) Then Text2.Text = "null" '实时错误:-2147467259(80004005)
If IsNull(rs.Fields(3)) Then Text3.Text = "null" '无效的 null使用
rs.MoveNext '<------程序停在这一行,鼠标停在几个rs.Fields上都有值呀
Wend
Else
LblTip.Caption = "没有变动大于" & BlcChng / 10000 & "的类账户"
End If
Disconnect
数据库中数据是从文本文件中导入的,各字段均为字符串型,但一般都是象"457,994.98" "0.00"这样的
BlcChng = Val(TextBlcChng.Text) * 10000 'BlcChng 为双精 取自一个textbox的值
QryStr = "Select CusAccNum,CusAccNam," & FieldName(1) & "," & FieldName(2) & "," & " Cdbl(" & FieldName(2) & " - " & FieldName(1) & ") From CusAccBlc where "
QryStr = GenaQryStr & " ABS(Cdbl(" & FieldName(2) & " - " & FieldName(1) & " )) > " & BlcChng 'QryStr为查询字符串,FieldName(1)和FieldName(2)为记录字段名的字符串变量 DB_Connect '连接函数
Set rs = QueryExt(QryStr) '查询函数
If Not rs.EOF Then
LblTip.Caption = "变动大于" & BlcChng / 10000 & "万元的账户"
rs.MoveFirst
While Not rs.EOF
Text5.Text = rs.Fields(1)
If IsNull(rs.Fields(0)) Then Text.Text = "null" '<--- 这4行是我作测试的
If IsNull(rs.Fields(1)) Then Text1.Text = "null" '我按F8循环几次后出现这样的错误提示:
If IsNull(rs.Fields(2)) Then Text2.Text = "null" '实时错误:-2147467259(80004005)
If IsNull(rs.Fields(3)) Then Text3.Text = "null" '无效的 null使用
rs.MoveNext '<------程序停在这一行,鼠标停在几个rs.Fields上都有值呀
Wend
Else
LblTip.Caption = "没有变动大于" & BlcChng / 10000 & "的类账户"
End If
Disconnect
解决方案 »
- 出怪了,我连 Form 的 BorderStyle 的属性 都控制不了,
- 急救:关于数据库问题!!
- 求 急用
- 3个VB入门级的问题,本人初学VB请大家多帮帮忙,一个问题20点
- 应用程序转进程
- 哪位老大提供一个vba的资料下载啊!谢谢
- Datagrid问题,能否改变DataGrid某一行或某一列的颜色,如何动态实现?
- 郁闷...开发的程序只能单机使用
- 怎样 去掉 在创建COM(ActiveX DLL/OCX)的时候出现的警告对话框??
- 请问微软的MDB库最大容量是多少记录?
- Optional ByVal paramDockingOffset As Long = 0& 后面那个&是什么意思?
- 如何在VB6.0 中判断一个窗口正在打开中?
Text5.Text= rs.Fields(1) & "null"
text.text=rs.fields(0) & "null"
text1.text=rs.fields(1) & "null"
...