论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
If intLenKey > 0 Then
strOrderSQL = Mid(strOrderSQL, 1, intLenKey - 1)
If mstrOrderSQLs <> "" Then
mstrOrderSQLs = mstrOrderSQLs & ","
End If
mstrOrderSQLs = mstrOrderSQLs & strOrderSQL & strOrder
End If
Next j
mstrOrderSQLs = " order by " & mstrOrderSQLs
Else
mstrOrderSQLs = ""
End If
'字符串连接生成SQL查询语句
strSQL = "select " & strKey & " from " & " 专家库 " & strWhere & mstrOrderSQLs
strsqlAll = "select " & strkeys & " from " & " 专家库 " & strWhere & mstrOrderSQLs
adoconnection.Execute strSQL
adoconnection.Execute strsqlAll
If Err Then
MsgBox Err.Number & vbCrLf & Err.Description & Err.Source, vbCritical, "SQL语句错误"
Err.Clear
Exit Sub
End If
Set recResult = New ADODB.Recordset
Set recKeyword = New ADODB.Recordset
frmQueryResult.strSQL = strSQL
frmQueryResult.strSQL = strsqlAll
recKeyword.Open strSQL, adoconnection, adOpenStatic, adLockOptimistic
recResult.Open strsqlAll, adoconnection, adOpenDynamic, adLockOptimistic
If recKeyword.RecordCount <= 0 Then
MsgBox "没有您要查找的记录!", vbInformation + vbOKOnly, "找不到记录"
Exit Sub
End If
'查询结果显示
frmQueryResult.Show vbModal
End Sub
5 结语
中国学会工程地质专业委员会建立“全国工程地质专家库系统”的目是便于相互了解、交流,以满足各单位部门了解专家专家信息的需求,充分发挥专家作用,更快推进工程地质学科和事业的创新发展。