File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes strange problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "strange problem " Watch "strange problem " New topic

strange problem

Vaibhav Deshpande
Ranch Hand

Joined: Apr 26, 2002
Posts: 33
HI All,

My database is MYSQL and using struts framework.

I am trying to run one sql that is

Select GC.GEN_Code_Id, GC.GEN_Code_Type_Id, GC.GEN_Code
From GEN_Code_Types GCT, GEN_Codes GC
Where GCT.GEN_Code_Type_Id = GC.GEN_Code_Type_Id
And GCT.GEN_Code_Type = 'US_Military_Service_Code_Id'
And GCT.GEN_Valid_Record_Flag = 1
And GC.GEN_Valid_Record_Flag = 1
Order By 1

THis sql executes file.

I am writing code like

result = resultset.getString("GC.GEN_Code");
The above line executes fine in window env. but same code when tried to run on linux m/c
I got error msg for above lien that "GC.GEN_Code" column doesn't exist.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

Try without your table alias "GC" like

result = resultset.getString("GEN_Code");

hope this work

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
I agree. Here's the link:
subject: strange problem
It's not a secret anymore!