Re: open cursor with hold question
From: Jim Cromie (jcromie_at_divsol.com)
Date: 05/10/04
- Next message: Jupiterhost.Net: "Re: using binary data in variable in an INSERT/UPDATE statement"
- Previous message: Jupiterhost.Net: "Re: using binary data in variable in an INSERT/UPDATE statement"
- Maybe in reply to: Jenny Liu: "open cursor with hold question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 10 May 2004 13:47:31 -0600 To: "James D. White" <jdw@ou.edu>
James D. White wrote:
> You could try using two connect calls with two different DB handles.
> Prepare the select using one
> DB handle and insert with the other. A commit on the second DB handle
> should not close the
> fetchrow_array cursor on the first.
>
> James D. White (jdw@ou.edu)
> Department of Chemistry and Biochemistry
> University of Oklahoma
> 101 E. Constellation, SRTC 2100
> Norman, OK 73019
> Phone: (405) 325-4912, FAX: (405) 325-7762
>
>
>
> Liu, Jenny wrote:
>
>> Hi,
>>
>> How could I declare an open cursor with hold in a perl DBI program?
>>
>> I have to do a commit for every 30000 insertion to avoid long
>> transaction.
>> But the commit will close my ($patkey,$extid) = $sth->fetchrow_array)
>> cursor. I got an SQL error 400.
>
Hmm - Im missing something (so take this as a WAG, potential
reddherring, etc)
I was suprised that it wasnt $sth->commit(),
but I checked, youre right (ie Pod agrees).
did you by any chance try $sth->commit() ? would you ?
The DBI supports various methods on several different handle-types,
this might just be one of them.
for curiosity, what DBD are you using, do you have another to test
your code against ?
- Next message: Jupiterhost.Net: "Re: using binary data in variable in an INSERT/UPDATE statement"
- Previous message: Jupiterhost.Net: "Re: using binary data in variable in an INSERT/UPDATE statement"
- Maybe in reply to: Jenny Liu: "open cursor with hold question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|