This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing data fields a different way

Tony Huynh
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I usually access and display my data fields like so..
This is my connetion tags:
<tsx:dbconnect id="myDbConnection"<br /> driver=""<br /> url="jdbc:db2:my_database"<br /> userid="userid"<br /> passwd="password">
The SQL query:
<tsx:dbquery connection="myDbConnection" id="findDocExist">SELECT DOCUMENT.DOC_ID AS DOC_ID FROM DOCUMENT WHERE DOC_LOCATION = '<%=doc_location%>'</tsx:dbquery>
The results are displayed by the following:
<tsx:getProperty name="findDocExist" property="DOC_ID" />
That's all fine but what I really want is to grab the doc_id from the database and use it in my scriptlets (comparing ids). I don't think I can use these tags in my scriplets... it just comes up with a bunch of errors!
For example I've been doing this:
<% if ( %><tsx:repeat><tsx:getProperty name="findDocExist" property="DOC_ID" /></tsx:repeat><% == request.getparameter("doc_location") { %><br /> The Document you specified in document location: <%=request.getParameter("doc_location")%> already exists!<br /> <br /> Please enter another location!<br /> If anyone know how I can access my data using scriptlets instead of this tag format please reply. Thanks in advance!!!<br /> -Tony
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic