3

I have just connected Powerbuilder with PostgreSQL through ODBC, but something goes wrong when I'm trying to create a datawindow! I can't understand where is the problem. I will be so grateful to receive any answers.

The error:

Cannot create DataWindow

SQLSTATE=42P01
ERROR:relation "core sample" does not exist;

No query has been executed with that handle

SELECT CORE_SAMPLE.N_CORE,      CORE_SAMPLE.DEPTH,

CORE_SAMPLE.WELL_ID_WELL,   CORE_SAMPLE.ID_CORE FROM 

CORE_SAM'
Seki
  • 11,135
  • 7
  • 46
  • 70
user2423106
  • 33
  • 1
  • 1
  • 3
  • Your error message doesn't make a lot of sense. The query doesn't match the message. Did you copy that verbatim? Also, as always: version numbers of your software. – Erwin Brandstetter May 26 '13 at 21:27
  • Thank you for answering, I almost didn't work with these both programs, that's why I have such problems( And yes, I copied this verbatim. PostgreSQL 9.2, PowerBuilder 10.0. – user2423106 May 26 '13 at 21:32

1 Answers1

4

Obviously, there is a mixup with names. "core sample" is not the same as CORE_SAMPLE. Hard to say more, based on what little information we have here.

Unquoted identifiers are cast to lower case in PostgreSQL, so CORE_SAMPLE, Core_Sample or core_sample end up to be identical.
But once you enclose identifiers in double quotes, the name is preserved as is. This way you can have otherwise illegal characters like a space in the name: "core sample". My standing advise is to stay away form that and use legal, lower case identifiers exclusively with PostgreSQL.

The error message tells you there is no table named "core sample", at least not in the database you connected to in any of the schemas listed in the search_path.
But the displayed query refers to a table named CORE_SAMPLE which does not match this error message.

Community
  • 1
  • 1
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228