菜单

备份数据表为insert

2020年3月17日 - 数据网络

ado连接ms sql server 2000程序

unit Unit1;

function adothread(param: pointer): integer; stdcall;var con, cmd :
variant;begin coinitialize(nil); con := getnewconnection(…); if
varisempty(con) then begin //未连接上,退出 exit; end eles cmd :=
getnewcommand(con) while bterminate do begin if varisempty(con) then
//连接失败 退出 exit else sleep(1000); end; closeconnection(con);
//自定义的关闭函数。 其实测试时, cmd := unassigned; couninitialize;
result := 0;end;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DB,
Datasnap.DBClient;

type
TForm1 = class(TForm)
cds: TClientDataSet;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
procedure ExportData(const tableNames: string);
procedure ImportData(const fileName, tableNames: string);
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

uses untDB;

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图