我用tquery连接服务器上的数据库,出现这样的问题:
with query1 do
begin
active:=false;
requestlive:=true;
sql.clear;
sql.add('select studeng_id from student');
prepare;
active:=true;
end;上面的没有报错!
但是如果这样with query1 do
begin
active:=false;
requestlive:=true;
sql.clear;
sql.add('select studeng_id as 学号 from student'); //加入学号
prepare;
active:=true;
end;就会报错!(table is read only)!
为什么?
with query1 do
begin
active:=false;
requestlive:=true;
sql.clear;
sql.add('select studeng_id from student');
prepare;
active:=true;
end;上面的没有报错!
但是如果这样with query1 do
begin
active:=false;
requestlive:=true;
sql.clear;
sql.add('select studeng_id as 学号 from student'); //加入学号
prepare;
active:=true;
end;就会报错!(table is read only)!
为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货