Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Failing Reading column alias in MyEclipse 2016 db2 10
Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748118] Fri, 18 November 2016 15:23 Go to next message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
Hi, I'm having trouble looping through a query result set when I use an alias.

For example my original query is SELECT DATE AS MY_DATE FROM ACCC.EMP

when I try to
while (archiveRs.next()) {
AuxInfo auxDetail = newAuxInfo();
auxDetail.setPodI(new Long(archiveRs.getString("MY_DATE")));

}


It doesn't recognize "MY_DATE". I read somewhere you have to choose an option to use COLUMN LABEL not COLUMN HEADER but I can't find it. Does anybody know how I can resolve this?

Any help would be appreciated.

Thanks,

Mike
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748136 is a reply to message #1748118] Fri, 18 November 2016 20:08 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 10333
Registered: July 2009
Senior Member
can you please give more context
i dont see how this is related to xtext
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748137 is a reply to message #1748136] Fri, 18 November 2016 20:11 Go to previous messageGo to next message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
No Message Body
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748138 is a reply to message #1748137] Fri, 18 November 2016 20:24 Go to previous messageGo to next message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
Hi Christian, I'm sorry, I'm not sure what xtext is. In my java app I am running a query using an "AS" so for example SELECT NAME AS FIRST_NAME using jdbc drivers. When I iterate through the result set I reference the COLUMN as FIRST_NAME. When I used MyEclipse 2015 32 bit it worked fine. I upgraded to MyEclipse 2016 64 bit and it fails. I need to reference it as NAME and then it works fine. Looking on line it said I need to reference the field as COLUMN LABEL not COLUMN NAME and there was an option to do that somewhere in Eclipse. Sorry if I'm not explaining this well but I'm a little confused too. Hopefully this makes more sense. Thanks for your help.
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748139 is a reply to message #1748138] Fri, 18 November 2016 20:42 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 10333
Registered: July 2009
Senior Member
yes but at this place is nobody how can give you support on myeclipse
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748144 is a reply to message #1748118] Fri, 18 November 2016 22:22 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 487
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Please use the MyEclipse forum: https://www.genuitec.com/forums/topics/myeclipse/
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748279 is a reply to message #1748136] Mon, 21 November 2016 19:12 Go to previous messageGo to next message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
Hi Karsten,

How should I use that forum link? I'm confused.
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748280 is a reply to message #1748136] Mon, 21 November 2016 19:13 Go to previous messageGo to next message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
Hi Karsten,

How should I use that forum link? I'm confused.
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748287 is a reply to message #1748280] Mon, 21 November 2016 19:59 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 10333
Registered: July 2009
Senior Member
Inside the forums there is a form to create new topics
Re: Failing Reading column alias in MyEclipse 2016 db2 10 [message #1748288 is a reply to message #1748280] Mon, 21 November 2016 20:04 Go to previous message
Mike Pietro is currently offline Mike PietroFriend
Messages: 6
Registered: November 2016
Junior Member
I figured it out. I had to reference db2jcc.jar in my build path. I was using db2jcc4.jar.
Previous Topic:Understanding the Web Services
Next Topic:Model display on load in XTEXT Web Editor
Goto Forum:
  


Current Time: Thu Mar 30 07:03:18 GMT 2017

Powered by FUDForum. Page generated in 0.04986 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software