H
hzjone
Unregistered / Unconfirmed
GUEST, unregistred user!
初始化記錄。。。<br>procedure TCustomADODataSet.InternalInitRecord(Buffer: PChar);<br>var<br> I: Integer;<br>begin<br> for I := 0 to Fields.Count - 1 do<br> PVariantList(Buffer+SizeOf(TRecInfo)) := Null;//給各個字段一個NULL。。<br>end; <br>PVariantList(Buffer+SizeOf(TRecInfo)) := Null;<br> PVariantList = ^TVariantList;<br> TVariantList = array[0..0] of OleVariant;<br>我這邊的問題是 TVariantList 定義成長度為1的OLEVARIANT數組,怎麼還可以<br>for I := 0 to Fields.Count - 1 do<br> PVariantList(Buffer+SizeOf(TRecInfo)) //這個I大於1的話不是前後有問題了嗎。。難道 TVariantList = array[0..0] of OleVariant;代表的是無限長的數組,不過經我測試應為長充為1的數組。。。。