Long String as Parameter
Posted: Thu 24 Oct 2013 14:33
I am doing an insert into a table that has a long VARCHAR(8000) field and it is appearing that the length of the first time I set the parameter is causing all future inserts to use that as the field length. So when I do a FieldByName('LongFld').AsString := LongString2000 and execute it, then the following FieldByName('LongFld').AsString := LongString4000 is truncated to 2000 characters. This is with Options.AutoPrepare := True;
If I set Options.AutoPrepare := False, then it seems to work ok and the full long string gets inserted. But isn't there a performance hit on the subsequent inserts if the statement has to be prepared each time?
If I set Options.AutoPrepare := False, then it seems to work ok and the full long string gets inserted. But isn't there a performance hit on the subsequent inserts if the statement has to be prepared each time?