获取数据窗口数据列的数据类型
llCount = Long(idwLTRList.Describe("DataWindow.Column.Count"))
For i = 1 To llCount
lsColumnName = Lower(idwLTRList.Describe('#' + String(i) + ".name"))
If Left(lsColumnName , Len('lis_data_lab_request_')) = 'lis_data_lab_request_' Then
lsColumnType = Lower(idwLTRList.Describe('#' + String(i) + ".Coltype"))
Choose Case True
Case Left(lsColumnType , Len('char')) = 'char'
idwLTRList.Object.Data[llRow , i] = String(Message.#CF._NullValue())
Case Left(lsColumnType , Len('long')) = 'long' OR &
Left(lsColumnType , Len('decimal')) = 'decimal' OR &
Left(lsColumnType , Len('int')) = 'int' OR &
Left(lsColumnType , Len('number')) = 'number' OR &
Left(lsColumnType , Len('real')) = 'real' OR &
Left(lsColumnType , Len('ulong')) = 'ulong'
idwLTRList.Object.Data[llRow , i] = Long(Message.#CF._NullValue())
Case Left(lsColumnType , Len('datetime')) = 'datetime'
idwLTRList.Object.Data[llRow , i] = DateTime(Message.#CF._NullValue())
Case Left(lsColumnType , Len('date')) = 'date'
idwLTRList.Object.Data[llRow , i] = Date(Message.#CF._NullValue())
Case Left(lsColumnType , Len('time')) = 'time'
idwLTRList.Object.Data[llRow , i] = Time(Message.#CF._NullValue())
Case Left(lsColumnType , Len('timestamp')) = 'timestamp'
idwLTRList.Object.Data[llRow , i] = DateTime(Message.#CF._NullValue())
End Choose
End If
Next
获取数据窗口数据列的数据类型
最新推荐文章于 2016-03-20 14:14:41 发布