|
sp; try
excelobj := CreateOleObject(''''Excel.Application'''');
excelobj.WorkBooks.Add;
except
Exit;
end;
if FileExists(inadapter.XlsFileName) and inadapter.OverWriteExistFile then
begin
DeleteFile(PChar(inadapter.XlsFileName));
end
else begin
excelobj.Quit;
Exit;
end;
for i := 0 to inadapter.Count-1 do
begin
end;
end;
constructor TManagedDataSet.Create(const intype : TManagedDataSetType = Editable);
begin
inherited Create(nil);
Self.Connection := DmCommon.Cnn;
Self.CursorLocation := clUseClient;
Self.Prepared := True;
Self.CacheSize := 1000;
if intype = ReadOnly then
begin
Self.CursorType := ctOpenForwardOnly;
Self.LockType := ltReadOnly;
end
else if intype = Editable then
begin
Self.CursorType := ctStatic;
Self.LockType := ltOptimistic;
end;
_type := intype;
_bUsed := False;
end;
destructor TManagedDataSet.Destroy();
begin
if Self.Active then
begin
Self.Close;
end;
if Assigned(_source) then
begin
FreeAndNil(_source);
end;
inherited Destroy();
end;
procedure TManagedDataSet.Use();
begin
if _bUsed then
begin
raise Exception.Create(''''Cannot get a used managed dataset !'''');
end;
_bUsed := True;
end;
procedure TManagedDataSet.Free();
begin
if Self.Active then
begin
Self.Close;
end;
Self.CommandText := '''''''';
Self.Parameters.Clear; // 睲埃把计
Self.MasterFields := ''''''''; // 睲埃琿
Self.DataSource := nil;
Self.ExecuteOptions := []; // 睲埃磅︽匡兜
_bUsed := False;
end;
procedure TManagedDataSet.SetDataSetType(const intype : TManagedDataSetType);
begin
if intype = _type then
Exit;
if intype = ReadOnly then
begin
Self.CursorType := ctOpenForwardOnly;
Self.LockType := ltReadOnly;
end
else if intype = Editable then
begin
Self.CursorType := ctStatic;
Self.LockType := ltOptimistic;
end;
end;
function TManagedDataSet.GetDataSource() : TDataSource;
begin
if not Assigned(_sour 上一页 [1] [2] [3] [4] 下一页 [VB.NET程序]VB的ShowInTaskbar功能分析以及用VC的实现 [Delphi程序]TFontNameComboBox及TFontSizeComboBox的实现 [Delphi程序]MSN / QQ 中的动画表情 在Delphi中RichEdit的实现… [VB.NET程序]MD5加密算法(16位,32位)的C#,VB的实现 [Web开发]利用JS获取IE客户端IP及MAC的实现 [Web开发]ASP.Net ViewState的实现 [Web开发]vb.net_asp.net跨栏表头_滚动表体的DataGrid的实现 [Web开发]无限分类算法 js 的实现 [JAVA开发]关于UDDI的实现 [SyBase]InnoDB 中文参考手册 --- 10 multiversioning 的实…
|