This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how dynamic column display and also sorting?

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one table
It contains username, and address.

I can display username and address and also sorting done both asc and desc order.

I want to add one more column in the display page and database/or file(Dyanmic fileds). for eg. i want to add emailid id.

My expected Output is both username and address and also dynamic field that is email id should be displayed. and also sorting also should be working.

and How to add Dynaic field values in DB/FILE?

Kindly send your suggestion.

Thanks
edward
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum where the database gurus hang out.
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
excuse me any body know the above question. Please Reply

Thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "dynamic fields"? You can add additional columns, give them whatever name you like, and retrieve and sort by them.
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "How?", do you mean how you can add columns to database tables? Any SQL reference will tell you how to do that (look for "ALTER TABLE").

But I don't know what you mean by "dynamic fields", so you might be looking for something completely different.
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
database fields are standard fields. in database i have customfields column also. if add new field. it will be stored into customfields like

<custom custom1="custom field name here" custom2="custom2 field name here" />

I hope you understood

thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<custom custom1="custom field name here" custom2="custom2 field name here" />

That's not SQL - where is this coming from, and what does it have to do with adding fields? Do you need to interpret this XML structure, and then adapt your DB schema dynamically? That would be more of an XML question (altering the schema would still be done by SQL DDL statements like "ALTER TABLE ADD COLUMN").
[ August 01, 2006: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic