2,507
社区成员




CREATE TABLE [dbo].[Test](
[id] [int] IDENTITY(1,1) NOT NULL,
[data] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Delphi 代码如下:
{
控件:
con1: TADOConnection;
qry1: TADOQuery;
btn1: TButton;
}
uses StrUtils;
var
strData: string;
begin
strData := 'Hello world';
strData := DupeString(strData, 10000); //将strData 重复1000遍。
with qry1 do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO Test ([data])VALUES('''+ strData +''')'); //插入数据
Prepared;
ExecSQL;
end;
end;