Re: Block insert into mysql(5.0) On Fri, 02 Nov 2007 04:13:22 -0700, Waruna wrote:
> On Nov 2, 3:55 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Waruna wrote:
>> > Is there a way to block insert into mysql(5.0) using c api of mysql
>> > db..
>>
>> > i.e.
>>
>> > say there is a table with 2 columns, one contains char other int
>> > then i want to insert 500 records at once,, as i explained below.
>>
>> > here i declare 2 arrays of char and int to store the values i want,
>>
>> > char *pzCol1[500*50];
>> > int *piCol2[500];
>>
>> > then i fil abov 2 arrays wit values and then the PROBLEM...
>> > Is there a way to above 500 records using below insert query usin' "c
>> > api" of mysql db..
>>
>> > INSERT INTO table VALUES (?, ?)
>>
>> > PLS HLP me.........
>>
>> SQL doesn't know anything about C arrays. But you can dynamically build
>> the INSERT statement string and have it insert as many values as you want.
>>
> But the thing is...... what i've mentioned above is totally doable in
> Oracle using its C API...
I'll bet a nickle that the "block insert" is (or was) nothing but an
abstraction layer over a for-loop on that very passed-in array.
Or, you can look at it as "This is why Oracle cost US$10000, and MySQL
costs... nothing."
Or, with a historical nod, "If you want Oracle, you know where to find
it."
--
For why should my freedom be judged by another's conscience?
-- Paul (I Corinthians 10:29) |