Re: Block insert into mysql(5.0)
Waruna <warunapww@gmail.com> wrote in
<1194002002.238390.268660@v29g2000prd.googlegroups .com>:
> 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..
>>
>> > 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.
>>
>> > 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 (?, ?)
>>
>> 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...
Good for Oracle.
You do realise you could've written that for() in quarter
the time you've spent buggering the good folks of
comp.lang.c++ and comp.databases.mysql, don't you? totally?
--
"I can't help but wonder if you... don't know a hell of a
lot more about practically every subject than Solomon ever
did." |