l3nz has asked for the wisdom of the Perl Monks concerning the following question:
O wise brothers,
I have came across a couple of problems using Ado with Perl under Win32 connecting to a Ms SqlServer 7.0 database. I have no problems when executing a single Sql query but in a case I have to compute variables in the same query being sento to the database engine, like
I have came across a couple of problems using Ado with Perl under Win32 connecting to a Ms SqlServer 7.0 database. I have no problems when executing a single Sql query but in a case I have to compute variables in the same query being sento to the database engine, like
If I do this, the resulting recordset object shows strange behaviours, likedeclare @VAR int; set @VAR = (select max(id) from table); select * from table2 where id = @VAR
- it does not test positive as empty (i.e. when both $rs->Bof and $rs->Eof true) so that my code tries to loop on it; nevertheless, the loop is infinite because $rs->Eof is never true even if $rs->MoveNext reports no errors and gets executed some thousand times before the Ctrl-C
- I read somewhere that it is possible to access the different outcomes from each Sql statement separately but I do not know how to do it (in fact I'd like to access only the result from the third statement, as the first two are not supposed to return anything, and I wonder if that's the problem with the point above)
- I casually noticed that loading the Data::Dumper module seems to break the ability for the Ado connection to open a recordset (it just freezes)
Anybody got an idea on how to overcome this result? I cannot use DBI because it would mean a major rewrite of existing code. Thank you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem with database under Win32
by NetWallah (Canon) on Nov 22, 2003 at 01:57 UTC | |
by l3nz (Friar) on Nov 22, 2003 at 10:59 UTC | |
Re: Problem with database under Win32
by runrig (Abbot) on Nov 22, 2003 at 10:03 UTC | |
by NetWallah (Canon) on Nov 23, 2003 at 16:47 UTC | |
by l3nz (Friar) on Nov 23, 2003 at 19:34 UTC | |
Re: Problem with database under Win32
by NetWallah (Canon) on Nov 22, 2003 at 07:04 UTC | |
by l3nz (Friar) on Nov 22, 2003 at 10:57 UTC | |
Re: Problem with database under Win32
by l3nz (Friar) on Nov 24, 2003 at 13:48 UTC |
Back to
Seekers of Perl Wisdom