Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resource Variable not resolving within the query...

Status
Not open for further replies.

vrs1008

Programmer
Sep 16, 2003
62
US
Hi,

When I am using resource variable to populate the value within the query, it is not working.

My statment is

=DBQuery( "INSERT INTO RETAIN_TB (ST_ID, CLAIM_FILE)
VALUES ("+Text(I_ST_ID)+", "+
"'" + "%RETAIN_DIR%" + TEXT (I_HDR_ID) + ".txt')",
-MDQ %MDQ% -DBNAME %DB_RETAIN% -CSTMT 1" )

%RETAIN_DIR% is not resolving and the value that goes to CLAIM_FILE column is %RETAIN_DIR%1234.txt

Rest of the variable (%MDQ% & %DB_RETAIN%)get there proper values.

Regards,
Vibhav1008
 
If I remove the quotes and build the map, it says that
------------------------------------
Rule references unknown type: %RETAIN_DIR%.
------------------------------------

Regards,
Vibhav1008
 
What version of TX are you using? the RR is pretty stable in 6.7.1 but there were problems with it before this.

You can debug the resource registry (to view resource registry variables being resolved), set the environment variable:

MERC_LOG_RES_ALIAS=c:\Mercator6.7\resreg.log

and restart the event server.

Normally if TX can't resolve a variable it sets to empty - so for some reason it doesn't see %RETAIN_DIR% as a variable at all.

Cheers,
Olly.
 
I think you can't use the resource registry for data in a rule that way.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Boca, That is what I thought....but was not too sure....

Thanks guys for your reply...I am still trying few things to populate the value of resource variable in the Rule...If it works I will post it here...and if you find some work around for the same then let me know...

Thanks again...

Regards,
Vibhav1008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top