JDBC SQL string help

Boomn4x4

New Member
Hello, I'm having a problem with an SQL statement through a JDBC connection. I know I'm connected and can collect data from some queries, but I'm struggling with a WHERE clause.

If I run the following SQL statement from my Progress editor, it works fine
select c-fld[3] from sys-ctl where typ="passhd".

However, I can't make that command work through a JDBC querey.
This is my select statement:
"SELECT \"c-fld\"[3] FROM \"sys-ctl\" WHERE \"sys-ctl\".\"typ\"=\"passhd\""

The error I'm getting is:
Error: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Column "passhd" cannot be found or is not specified for query. (13865)

From my reading of the Progress documentation error 13865 can related to hyphenated colums... which I have, but I think I'm escaping them correctly?

I know that a common issue is omitting the PUB schema, so I will mention that
I should also note that my URL has the DefaultSchema=PUB.

Any help would be appreciated.
 

Boomn4x4

New Member
Well, I figured out my initial problem.... the passhd should have been single, not double quotes.

However, now, I'm getting c-fld[3] (or c-fld) is an invalid column name on my output
o.println("rs.getString("c-fld[3]"));
 

Stefan

Well-Known Member
See the SQL manual on psdn, there is a proextent function or something similar that can /must be used to handle extent fields.
 
Top