I ran into a problem when trying to do bulk insert using TZQuery.Append/Post.
Here's an excerpt of my code in case I forgot something :
Code: Select all
Query := TZQuery.Create(nil);
Query.Connection := Connection;
Query.SQL.Text := 'select * from '+TableName+' where 0=1';
Query.Open;
Query.Append;
Query.Fields[0].Value := Par.Id;
Query.Fields[1].Value := Par.Val;
Query.Post;
Query.Free;
I think the code above should be ok, but feel free to correct me I if forgot something. I'm not really familiar with the Zeos ; do you have any advice where to look to debug it further ?