我有這么一段代碼
======================
with ADOQuery4 do
begin
close;
SQL.Clear;
SQL.Add('insert into xginfomation values');
SQL.Add('('''+bname+''','''+bcard+''','''+bsex+''','''+bportment+''','''+bphe+''','''+bpostid+''','''+xaddress+''','''+bpwd+''','''+bcardid+''')');
ExecSQL;
showmessage('recordcount====='+inttostr(recordcount));
if recordcount=1 then
showmessage('用戶信息輸入成功!')
else
showmessage('用戶信息增加出錯!');
end;
=============================
因為老在這裡出錯。我懷疑是sql語句的問題。我想把程序中運行的sql語句打印出來。
各位大俠有什麽方法呢?
俠女散分。。
======================
with ADOQuery4 do
begin
close;
SQL.Clear;
SQL.Add('insert into xginfomation values');
SQL.Add('('''+bname+''','''+bcard+''','''+bsex+''','''+bportment+''','''+bphe+''','''+bpostid+''','''+xaddress+''','''+bpwd+''','''+bcardid+''')');
ExecSQL;
showmessage('recordcount====='+inttostr(recordcount));
if recordcount=1 then
showmessage('用戶信息輸入成功!')
else
showmessage('用戶信息增加出錯!');
end;
=============================
因為老在這裡出錯。我懷疑是sql語句的問題。我想把程序中運行的sql語句打印出來。
各位大俠有什麽方法呢?
俠女散分。。
----------------------------------------
ADOQuery4.SQL.SaveTofile('d:/123.txt');
.........................................
看你的名字說“起名很難”我還不知道在哪裡設置名字呢?
----------------------------------------
ADOQuery4.SQL.SaveTofile('d:/123.txt');
.........................................
真的可以啊。謝謝啊
看你的名字說“起名很難”我還不知道在哪裡設置名字呢?