Item12236: SQLFORMAT and continue="off" not working when using bindValues

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: SqlPlugin
Branches: trunk
Reported By: FrankHoellering
Waiting For:
Last Change By: MichaelDaum
SQLFORMAT does work with continue="off" when using the params attribute in %SQL% as the params are not stored in the cache.

The following modification in Core.pm work for me:
diff Core.pm_orig Core.pm
144a145
>       bindVals => \@bindVals,
180a182
>   my $bindVals = $entry->{bindVals};
187c189
<       $sth->execute or
---
>       $sth->execute(@{$bindVals}) or

Basicly the bindVals are added to the cache and reused when executing the query in handleSQLFORMAT. I'm not a perl hacker, so I'm not sure if this is the correct/best way of passing and dereferencing the parameter array.

Hope that helps, Frank

-- FrankHoellering - 12 Nov 2012

 

ItemTemplate edit

Summary SQLFORMAT and continue="off" not working when using bindValues
ReportedBy FrankHoellering
Codebase
SVN Range
AppliesTo Extension
Component SqlPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins SqlPlugin:01c886bf5e46
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins SqlPlugin:01c886bf5e46
Release01x01Checkins
Topic revision: r3 - 18 Mar 2014, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy