query的问题(50分)

  • 主题发起人 主题发起人 okmwq
  • 开始时间 开始时间
O

okmwq

Unregistered / Unconfirmed
GUEST, unregistred user!
我用Tquery 的refesh更新数据
结果是不行
出错报告是无唯一索引
如何解决 代码是
with query1 do
sql.text:='select * from xs order by id asc'
open
.
.
refrsh
end
id is 主键
use sqlserver
 
I think SQL must be:
SQL.Add('select * from xs order by id asc');
yes?

refrsh? I always use close and open, you see:
===========
open
.
.
close;
open;
end
id is 主键
use sqlserver
=============
sorry, my windows98 can not use chinese now. :(
 
我 no think 用 close and open
only think use refrsh
sorry, my windows98 can not use chinese now,also :(
 
Query的REFRESH 在 SQL 数据库时是无效的, 只能使用CLOSE和OPEN方法
 
try this:

with query1 do
begin
sql.clear;
sql.add('select * from xs order by id asc');
open;
end;
 
wang yes?
if it is true ,....
 
最好别用 * , 写起来简单,执行起来慢, 把ID放在Select 后面如何,
我猜 :}
 
接受答案了.
 
后退
顶部