|
本帖最后由 wind7412 于 2016-9-26 11:32 编辑
请教:
我有一段代码如下:
“Dim DBRst As New ADODB.Recordset
Dim SQLRst As String
Dim i As String
Dim dateKS As String
Dim dateJZ As String
'DBRst.ActiveConnection = ConnDB
'DBRst.CursorLocation = adUseServer
'DBRst.LockType = adLockBatchOptimistic
dateKS = Me.txtKSRQ
dateJZ = Me.txtJZRQ
SQLRst = "select INVENTORY_ITEM_ID from inv.mtl_system_items_b " _
& "where inventory_item_status_code='Active' AND CREATED_BY = '1063' and (organization_id = '28' OR organization_id = '31') " _
& "and (CREATION_DATE between to_date('" & dateKS & "','yyyy/mm/dd') & " _
& "and to_date('" & dateJZ & "','yyyy/mm/dd')) "
DBRst.Open SQLRst, ConnDB, adOpenStatic”
在调试时,本地窗口中SQLRst的值是:
"select INVENTORY_ITEM_ID from inv.mtl_system_items_b
where inventory_item_status_code='Active'
AND CREATED_BY = '1063'
and (organization_id = '28' OR organization_id = '31')
and (CREATION_DATE between to_date('2016/9/12','yyyy/mm/dd') & and to_date('2"
为什么会截断呢? |
|