Subject RE: [firebird-support] Re: bulk insert
Author Rick Debay
Unfortunately, you still need to send the values one at a time and get
back each response.
Sending a bunch of parameters at once and getting back one response
isn't supported.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Aage Johansen
Sent: Thursday, May 19, 2005 5:24 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: bulk insert

pwidf wrote:

>> Using a parameterized, prepared insert statement should be fast - >
> > maybe as fast using an "external table".
>
> mm, what do you by "parameterized, prepared insert statement"?
> in the background this is for use in an adhoc query tool, so i am
doing some stringbuilding to generate the insert statements >

This depends somewhat on which component set you are using.
You could build a string like
insert into TBL (F1,F2) values (:P1,:P2) Then stuff this into a query
component, and do a 'prepare'.
Then for every record you want to insert, you set the parameters P1 and
P2 to the actual values, and execute.
The 'prepare' is done once, and thus the server don't have to parse and
optimize the same insert statement for every record.

--
Aage J.



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item on
the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links