我的英文不好,翻译的不通,将帮助里的原话一并附上。
If a variant references a COM object, any attempt to convert it reads the
objectdefault property and converts that value to the requested type.
If the object has no default property, an exception is raised.
附贈一個函數
function VariantToRecordset(const Value: OleVariant): _Recordset;
begin
With TVarData(Value) do
if VType = varDispatch then
Result := IDispatch(TVarData(Value).VDispatch) as _Recordset
else
Result := nil;
end;