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 strange problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "strange problem " Watch "strange problem " New topic
Author

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: 1081

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: strange problem