RE: [dbi] Re: Attempt to initiate a new SQL Server operation with results pending.
- From: martin.evans@xxxxxxxxxxxx (Martin J. Evans)
- Date: Thu, 23 Jun 2005 13:12:32 +0100 (BST)
Daniel,
On 22-Jun-2005 Daniel Kasak wrote:
> Martin J. Evans wrote:
>
>>As far as I am aware this is a limitation of the TDS protocol used and
>>your example code will not work unless you force a server-side cursor (see
>>DBD::ODBC pod and look for odbc_SQL_ROWSET_SIZE but I warn you that you
>>really
>>will need to close everything i.e. force SQLFreeStmt(SQL_CLOSE) or you will
>>get
>>hangs).
>>
>>
> I see. Sounds good.
>
>>BTW, the example in the pod should be $dbh->{odbc_SQL_ROWSET_SIZE} = 2 not
>>$dbh->{SQL_ROWSET_SIZE} = 2.
>>
>>
>>
> Just tried that. Doesn't seem to have any effect on my system. Here's
> the line I added right after create $dbh :
> $dbh->{odbc_SQL_ROWSET_SIZE} = 2;
Didn't you say something about using FreeTDS? If so that hack might not work
for FreeTDS. Against MS SQL Server ODBC driver it works - I tried it with your
example.
>>I would seriously suggest you try and avoid multiple active statements -
>>there
>>is nearly always a SQL or some other way.
>>
>>
> Perhaps. To be honest I'm not that concerned. If it was DBD::mysql I'd
> be mortified, but I don't have too much to do with SQL server, so I'll
> just create lots of $dbh things and ->finish all the statements and hope
> that things hold together while I'm sitting around twiddling my thumbs
> waiting for MySQL-5.0.x to stabalise ( stored procedures & views ).
>
> Thanks for your help.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development
.
- Follow-Ups:
- References:
- Re: Attempt to initiate a new SQL Server operation with results pending.
- From: Daniel Kasak
- Re: Attempt to initiate a new SQL Server operation with results pending.
- Prev by Date: Re: Oracle cursor help
- Next by Date: RE: Oracle cursor help
- Previous by thread: Re: Attempt to initiate a new SQL Server operation with results pending.
- Next by thread: Re: [dbi] Re: Attempt to initiate a new SQL Server operation with results pending.
- Index(es):
Relevant Pages
|
|