Dim strSQL As String
Dim strWhe As String
Dim i As Integer
strSQL = _
" SELECT NAME, CARD_NUM, TEL, OPEN_TIMES, TIMES, ENTER_TIME " + _
" From T_MEMBER "
strWhe = " WHERE ENTER_TIME BETWEEN '" + strDate + " 00:00:00' AND '" + strEndDate + " 23:59:59' "
If strName <> "" Then
strWhe = strWhe + " AND NAME LIKE '%" + strName + "%' "
End If
If strCard <> "" Then
strWhe = strWhe + " AND CARD_NUM = '" + strCard + "' "
End If
strWhe = strWhe + " AND STATUS = 10 ORDER BY OPEN_TIMES, ENTER_TIME"
strSQL = strSQL + strWhe
Logger strSQL, "loadMember"
DataE.Commands("ComMember").CommandText = strSQL
'刷新Grid,这两句不可省
DataE.conDataLib.Close
DataE.conDataLib.Open
DataE.conDataLib.Execute "SET NAMES 'GBK'"
DataE.ComMember
If DataE.rsComMember.RecordCount = 0 Then
MemberMge.DgrdMember.Enabled = False
Else
MemberMge.DgrdMember.Enabled = True
End If
MemberMge.DgrdMember.ClearFields
MemberMge.DgrdMember.DataMember = DataE.Commands("ComMember").Name
MemberMge.DgrdMember.Columns(0).Width = 1500
MemberMge.DgrdMember.Columns(1).Width = 1400
MemberMge.DgrdMember.Columns(2).Width = 1600
MemberMge.DgrdMember.Columns(3).Width = 1400
MemberMge.DgrdMember.Columns(4).Width = 1400
MemberMge.DgrdMember.Columns(5).Width = 2200
MemberMge.DgrdMember.Columns(0).Caption = "会员名称"
MemberMge.DgrdMember.Columns(1).Caption = "会员卡号"
MemberMge.DgrdMember.Columns(2).Caption = "会员电话"
MemberMge.DgrdMember.Columns(3).Caption = "开通球数"
MemberMge.DgrdMember.Columns(4).Caption = "剩余球数"
MemberMge.DgrdMember.Columns(5).Caption = "入会时间"
6 个解决方案
#1
只有远程访问数据库的这台机器出现这种情况,而另一台本地访问数据库的机器却没有问题。我回到家后测试也没有出现过这种问题
#2
DataEnvironment这个东西经常有这问题那问题的。可能是缺少了相应的控件和动态库吧
#3
我现在该怎么办呢,现在很难定位到问题出在哪,也不可能去客户那用他的机器的开发
#4
加一个字段吧
#5
加个字段有什么用
#6
Dim i As Long
#1
只有远程访问数据库的这台机器出现这种情况,而另一台本地访问数据库的机器却没有问题。我回到家后测试也没有出现过这种问题
#2
DataEnvironment这个东西经常有这问题那问题的。可能是缺少了相应的控件和动态库吧
#3
我现在该怎么办呢,现在很难定位到问题出在哪,也不可能去客户那用他的机器的开发
#4
加一个字段吧
#5
加个字段有什么用
#6
Dim i As Long