Re: [Sqlrelay-discussion] SQLRelay 0.35 + Perl API + DB2
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2008-03-26 14:24:25
|
Ugg, it looks like the DBI driver for SQL Relay converts ?'s to :1's. I suspect this is because back when the DBI driver was first written, SQL Relay didn't support native binds and used the :1 format. It should check the DB type and either leave the ?'s alone or convert to the appropriate format like the PHP Pear DB driver does. I think a quick fix would be to comment out line 135 of SQLRelay.pm: Change: $statement =~ s/\?/":" . ++$count/eg; to: # $statement =~ s/\?/":" . ++$count/eg; That should have the effect of leaving ?'s alone. The rest should "just work". Let me know how that goes though. It's possible that some other code may need to be modified. I'll put in a fix for this in the next release. David Muse dav...@fi... On Thu, 2008-03-20 at 01:29 +0900, Lee Standen wrote: > Hey Guys, > > > > I’ve been trying to get SQLRelay 0.35 working with DB2, and now that I > finally got it to connect, I’m having trouble with the Perl API > munging the SQL into an invalid format. Here’s an example: > > > > Original SQL: SELECT oid FROM service WHERE oid=? > > Perl API Query: SELECT oid FROM service WHERE oid=:1 > > Error: [IBM][CLI Driver][DB2/LINUX] SQL0312N The host variable "1" is > used in a dynamic SQL statement, a view definition, or a trigger > definition. > > > > This is just a simple query I’ve tried to replicate the issue, but it > obviously happens with any. > > > > SQLRelay 0.35 > > Client Version: 8.1.0.48 (Fixpak 5) > > > > Note: This works perfectly fine if I bypass the SQLRelay server and go > direct to the database. > > > > So I have two quick questions: > > 1. Is this a known issue which has been fixed in a later version? > (I’d try this, but newer versions won’t build on my OS without serious > hacky library updates) > > 2. If this is not fixed, is there a patch floating around I can > apply to 0.35 to make this work? > > > > Thanks J > > > > > > > __________________________________________________ > D O T E A S Y - "Join the web hosting revolution!" > http://www.doteasy.com > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion __________________________________________________ D O T E A S Y - "Join the web hosting revolution!" http://www.doteasy.com |