C/S 中可以用哪個function 知道資料鎖定? |
答題得分者是:jackkcg
|
y2485967
一般會員 發表:9 回覆:0 積分:1 註冊:2002-10-21 發送簡訊給我 |
|
jackkcg
站務副站長 發表:891 回覆:1050 積分:848 註冊:2002-03-23 發送簡訊給我 |
此為轉貼資料 參考看看 MS-SQL :連接正在被另一個狀態使用
// dataBaseNameS : string is the name of the alias (MS-SQL 6.5)
begin
Query1 := TQuery.Create (Application);
With Query1 do
begin
DatabaseName := dataBaseNameS;
SQL.Text := 'SELECT * FROM ABLESTOP';
// the exception disappears if the following is removed
Unidirectional := True;
Open;
end;
ShowMessage ('ok') Table1 := TTable.Create (Self);
With Table1 do
begin
DatabaseName := dataBaseNameS;
TableName := 'COMPONENT_PLAN';
UpdateMode := upWhereKeyOnly;
Open
end; Table1.Insert;
Table1.FieldByName ('PARTNO').AsString := IntToStr (GetTickCount);
Table1.FieldByName ('ID').AsString := 'WWxx';
Table1.FieldByName ('VERSION').AsInteger := 1;
// the exception will occurr in the next statement:
// "Connection is in use by another statement"
Table1.Post;
------
********************************************************** 哈哈&兵燹 最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好 Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知 K.表Knowlege 知識,就是本站的標語:Open our mind |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |