参考:
Dim rsUSER As ADODB.Recordset
Dim SQLstmt As String
Set PALUSADBCon = New ADODB.Connection
PALUSADBCon.ConnectionTimeout = 3000
PALUSADBCon.Open "Provider=MSDataShape.1;Persist Security Info=true;Data Source=172.#.#.#;User ID=pusa; Password =usa; Initial Catalog=PALUSASDS;Data Provider=SQLOLEDB.1"Set dbRs = New ADODB.Recordset
SQLstmt = " select * From vbak where SHPIN4='SEA' " & _
"and ordnum=(select top 1 ordnum From JOIT where caseno = " & _
" (select top 1 caseno from cast where loadid='" & LOADID & "'))"SQLstmt = " select climat,count(climat) as QTY From JOIT " & _
" where caseno in ( " & _
" select caseno " & _
" from cast where loadid='" & LOADID & "'" & _
" ) " & _
" group by climat "
Dim rsUSER As ADODB.Recordset
Dim SQLstmt As String
Set PALUSADBCon = New ADODB.Connection
PALUSADBCon.ConnectionTimeout = 3000
PALUSADBCon.Open "Provider=MSDataShape.1;Persist Security Info=true;Data Source=172.#.#.#;User ID=pusa; Password =usa; Initial Catalog=PALUSASDS;Data Provider=SQLOLEDB.1"Set dbRs = New ADODB.Recordset
SQLstmt = " select * From vbak where SHPIN4='SEA' " & _
"and ordnum=(select top 1 ordnum From JOIT where caseno = " & _
" (select top 1 caseno from cast where loadid='" & LOADID & "'))"SQLstmt = " select climat,count(climat) as QTY From JOIT " & _
" where caseno in ( " & _
" select caseno " & _
" from cast where loadid='" & LOADID & "'" & _
" ) " & _
" group by climat "
解决方案 »
- 数据库设计
- 我想将2个不完全相同列项名的表,用一个select查询,就是将table1的流和table2的流相接
- 菜鸟请教:求一Sql语句,请指点……
- 一个简单的存储过程
- 怎样在不同数据库之间复制数据
- 当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。
- select sum(金额) 的问题
- *****请教一条查询语句******
- 不用游标写过程, 比较难
- 求一SQL通用中位数(需自编制)函数,同EXECL的PERCENTILE函数,高手请进!!!
- 嗯,那个,那个text类型字段值修改问题啊,怎么修改text值字符大于8000字的值?
- 在asp.net中可以通过update视图来更新与其相关联的数据表的内容么?索引视图是什么意思?等两个问题
gjz = trim(Text6.Text)
Select Case Label6.Caption = " 人员ID"
Adodc1.recordsource = "select * from 人员库 where 人员ID =" & cint(gjz)
Case Label6.Caption = "工号"
adodc1.RecordSource = "select * from 人员库 where 工号 ='" & gjz & "'"
Case Label6.Caption = "姓名"
adodc1.RecordSource = "select * from 人员库 where 姓名 ='" & gjz & "'"
End Select
label6.caption & " ='" & trim(Text6.Text) & "'"End Select
gjz = trim(Text6.Text)
Select Case Label6.Caption
Case "人员ID"
Adodc1.recordsource = "select * from 人员库 where 人员ID =" & cint(gjz)
Case "工号"
adodc1.RecordSource = "select * from 人员库 where 工号 ='" & gjz & "'"
Case "姓名"
adodc1.RecordSource = "select * from 人员库 where 姓名 ='" & gjz & "'"
End Select