Query1.Close; Query1.SQL.Clear; Query1.SQL.Add('Delete from Country where Name = ''Argentina'''); Query1.ExecSQL;这样时允许的吧。你的意思是说:要执行一批SQL语句,要用text属性?我看到帮助中这么写的: The SQL property may contain only one complete SQL statement at a time. In general, multiple 'batch' statements are not allowed unless a particular server supports them.是不是说,不可以一批一批的执行SQL语句。 我是希望可以一次性insert多组数据到数据库中,可以提高数据库的操作速度。 不知道有什么好的方法。谢谢了!
Query1.SQL.Clear;
Query1.SQL.Add('Delete from Country where Name = ''Argentina''');
Query1.ExecSQL;这样时允许的吧。你的意思是说:要执行一批SQL语句,要用text属性?我看到帮助中这么写的:
The SQL property may contain only one complete SQL statement at a time. In general, multiple 'batch' statements are not allowed unless a particular server supports them.是不是说,不可以一批一批的执行SQL语句。
我是希望可以一次性insert多组数据到数据库中,可以提高数据库的操作速度。
不知道有什么好的方法。谢谢了!
当然这样也可能造成其他问题:比方说数据不一致。可以参看delphi帮助中 CachedUpdate 属性