M myvicy Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-30 #1 用delphi写asp 用的dll,在里面涉及到对blob字段的操作。 当我试图把该字段转化成blobstream对象是总是报错,希望各位能给以指点。
M myvicy Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-30 #2 错误为:Invalid class typecast 代码:BlobStream := TBlobStream.Create(AdoQuery.FieldByName('bdata') as TBlobField, bmRead);
错误为:Invalid class typecast 代码:BlobStream := TBlobStream.Create(AdoQuery.FieldByName('bdata') as TBlobField, bmRead);
D dreamfly1024 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-30 #4 调试看看这个东西的类型:AdoQuery.FieldByName('bdata')
Y yyy_fcz Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-30 #8 TBlobStream.Create(AdoQuery.FieldByName('bdata') as TBlobField, bmRead); -->TBlobStream.Create(AdoQuery.FieldByName('bdata').AsString as TBlobField, bmRead);
TBlobStream.Create(AdoQuery.FieldByName('bdata') as TBlobField, bmRead); -->TBlobStream.Create(AdoQuery.FieldByName('bdata').AsString as TBlobField, bmRead);
D delphi8511 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-31 #10 使用ADOBlobStream试试看: TADOBlobStream.Create(TBlobField(AdoQuery.FieldByName('bdata')), bmRead);
H huanghq123 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-31 #12 Stream := TMemoryStream.Create; TBlobField(AdoQuery.FieldByName('bdata')).SaveToStream(Stream);