A
asdfg1234
Unregistered / Unconfirmed
GUEST, unregistred user!
var
slAll,slLine: TStringList;
i: Integer;
begin
if OpenDialog1.Execute then
begin
slAll := TStringList.Create;
slLine := TStringList.Create;
slAll.LoadFromFile(OpenDialog1.FileName);
for i := 0 to slAll.Count-1 do
begin
if Trim(slAll.Strings)<>'' then
begin
slLine.Delimiter := ',';
slLine.DelimitedText := slAll.Strings;
AdoCommand1.CommandText:='insert into abc (BRN) values ('''+slLine.Strings[0]+''')';
AdoCommand1.Execute;
sql中定义的数据类型是datetime,插入的数据是为空时,打开数据库看到是1900-01-01 00:00:00.000 如何处理
slAll,slLine: TStringList;
i: Integer;
begin
if OpenDialog1.Execute then
begin
slAll := TStringList.Create;
slLine := TStringList.Create;
slAll.LoadFromFile(OpenDialog1.FileName);
for i := 0 to slAll.Count-1 do
begin
if Trim(slAll.Strings)<>'' then
begin
slLine.Delimiter := ',';
slLine.DelimitedText := slAll.Strings;
AdoCommand1.CommandText:='insert into abc (BRN) values ('''+slLine.Strings[0]+''')';
AdoCommand1.Execute;
sql中定义的数据类型是datetime,插入的数据是为空时,打开数据库看到是1900-01-01 00:00:00.000 如何处理