<br><br><div><span class="gmail_quote">On 10/4/06, <b class="gmail_sendername">Hartmaier Alexander</b> &lt;<a href="mailto:Alexander.Hartmaier@t-systems.at">Alexander.Hartmaier@t-systems.at</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; First of - did you try it like you would with any normal parameter?<br>&gt;<br>&gt; $row-&gt;$colname($value);<br><br>Works for me with varchar2 fields.</blockquote><div><br>The issue here is quoting/escaping stuff in Oracle varchar fields.&nbsp; The parameter binding in raw DBI mentioned earlier takes care of this.&nbsp; This is something we probably need to fix in the general case in DBIC at some point, but its something not many people run into in practice.&nbsp; 
<br><br>Right now in the Storage::DBI driver stuff, we just plug in ? placeholders then call -&gt;execute(@args) on the generated statement handle.&nbsp; The DBI docs basically say that when you do this, the values are quoted/treated like SQL_VARCHAR by default, except in the probably rare case that the DBD driver is smart enough to know the types of your ?'s, or if you've done a bind_param on this sth before.
<br><br>I would propose we could go this route in the future to improve our code in this area:<br><br>1) Support a column_info parameter called &quot;bind_attrs&quot;, which affects Storage::DBI's parameter type binding.&nbsp; This would allow the user to do this:
<br><br>__PACKAGE__-&gt;add_columns( funky_col =&gt; { bind_attrs =&gt; { ora_type =&gt; 'ORA_CLOB', ora_field =&gt; 'funky_col' } }, other_col =&gt; ... );<br><br>and have the case in this email thread handled correctly at execute time.&nbsp; This way users can always plug in whatever funky thing they need until we figure out how to support it correctly in a future release.
<br><br></div></div>2) Support automatic default &quot;bind_attrs&quot; for certain vendor and column_info-&gt;{data_type} combinations (like, automatically generating the above when the storage type is Storage::DBI::Oracle for columns with data_type set to 'varchar').
<br><br>-- Brandon<br>