Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iw_sql in DCT
summergs
Does anyone know if I can retrieve a database value in a DCT using iw_sql? (I am using an odbc connection) If so, can anyone give me sample code as I am not able to get mine to work. Thanks!
Find more posts tagged with
Comments
megamala
I don't think any iw_sql in DCT. you can't retrieve a DB value in DCT. you can retrieve DB value using perl code(inline callout).
Thanks in Advance
MM Guptha
PSUwin
Far as I know, iw_sql will only work in the PT.... If you did really mean PT, here's a little snippet that works for Oracle...
<P> Now this is from the Database: </P>
<iw_sql_open data_source = "dbi
racle:IWDAS1D"
user_name = "username"
password = "passwd"
aux_env = "ORACLE_HOME => '/apps/ora817/product/8.1.7'">
<iw_sql_query result_set = 'table_mapper'>
select shortid from iwov_idmaps
where longid = 'INTRANET_WEATHER__TEMPLATE_SAMPLES_STAGING'
</iw_sql_query>
<iw_sql_iterate var = 'this_row'
result_set = 'table_mapper'>
<iw_perl><![CDATA[
$weather_query = "select announcement, rawtohex (announcement) as hexannounce from $this_row->{shortid} where path = 'templatedata/intranet/weather/data/kr_comparison_test1'";
]]></iw_perl>
</iw_sql_iterate>
<iw_sql_query result_set = 'my_results'>
$weather_query
</iw_sql_query>
<iw_sql_iterate var = 'this_row'
result_set = 'my_results'
iteration = 'iter'>
<p class="headerRed">
<iw_value name='$this_row->{announcement}'/>
</p>
</iw_sql_iterate>
</iw_sql_open>
We also do use inlines that access DB to generate select list.
If you're really looking for something like that, let me know.
jaybee
Hey John can u send me one of ur unkine examples. I will apreciate