File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes how dynamic column display and also sorting? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how dynamic column display and also sorting?" Watch "how dynamic column display and also sorting?" New topic
Author

how dynamic column display and also sorting?

Edward Durai
Ranch Hand

Joined: Oct 09, 2004
Posts: 223
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


Thank You<br />Edward
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moving to the JDBC forum where the database gurus hang out.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Edward Durai
Ranch Hand

Joined: Oct 09, 2004
Posts: 223
excuse me any body know the above question. Please Reply

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42932
    
  68
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

Joined: Oct 09, 2004
Posts: 223
How?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42932
    
  68
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

Joined: Oct 09, 2004
Posts: 223
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
Marshal

Joined: Mar 22, 2005
Posts: 42932
    
  68
<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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how dynamic column display and also sorting?