• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

display data without retrieving from database

Hi,

Is there any way that we can display data without retrieve from database?
For example,

if inside the database:
code description
cm_123 coffee 123
cm_124 coffee 124
te_234 tea 234
te_235 tea 235

then I want to add another column called type which consist of 2 types tea and coffee so that in the html:

code description type
cm_123 coffee 123 coffee
cm_124 coffee 124 coffee
te_234 tea 234 tea
te_235 tea 235 tea

so when the user add and update the type, we just display it. is there any way of doing this without connecting to database?
0
widiyanto
Asked:
widiyanto
  • 2
2 Solutions
 
zzynxSoftware engineerCommented:
>> then I want to add another column
Visually, not in the database?

>>so when the user add and update the type, we just display it. is there any way of doing this without connecting to database?
Well, if you store your information in a certain class MyData, give that class an extra data member
       String type
and fill it in and display it.

Just don't know where you're going to "save" that information if not in the database?
0
 
widiyantoAuthor Commented:
haha.. honestly.. I also don't know...
but my supervisor asked me to do it... hehe..
0
 
zzynxSoftware engineerCommented:
Why are you not allowed to connect to the database?
You have to connect to get the other data...
Better ask your supervisor again...
0
 
MogalManicCommented:
You could cache the database records in an XML file.   Then the display could read the XML file and display it (Maybe using XSLT).

Another process could update the XML file when the database changes (or through a manually accessed web page)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now