PostsreSQL / SQL newbie question
Bob Fiering
bob at maxolution.nl
Sat Apr 13 14:28:14 EDT 2013
Hi Mark,
1. Yes, i can connect with the Omnis SQL Browser to the postgres database. I can use show data and it shows the content of that table.
I can also connect with the object in combination with my login window that i created.
2. With the pgAdmin tool i can see all tables and its corresponding data. When moving all tables under Omnis the tables were automatic placed under Schemas / public / Tables. Under public also the sequences are placed.
3/4 I think here lies the problem. The monitor tool you mentioned (and i missed) gives the message
2013-04-13 19:51:40 CEST ERROR relation "public.fbv" does not exist at character 1269
2013-04-13 19:51:40 CEST STATEMENT SELECT public.FBV.BBVCODE, ......all fields from the table..... public..FBV.BWEBSITE FROM public.FBV
when i choose show data in the SQL Browser of Omnis the statement is SELECT * FROM "public"."FBV"
So "public"."FBV" is the right syntax. When i look at the properties of the schema class the table name is public.FBV.
When i change this to "public"."FBV" the error changes to
2013-04-13 20:08:16 CEST ERROR column FBV.bbvcode does not exist at character 8
2013-04-13 20:08:16 CEST STATEMENT SELECT "public"."FBV".BBVCODE,"public"."FBV".BBVNAAM, ..... all the fields from the table........ "public"."FBV".BWEBSITE FROM "public"."FBV"
So somehow the schema class i created by dragging the table to Omnis has not the right relation to the table in postgres.
Not sure how to solve it, but i am a step further in the process of solving the problem.
regards,
Bob
Op 13 apr. 2013, om 17:57 heeft Mark Phillips <mark.phillips at mophilly.com> het volgende geschreven:
On Apr 13, 2013, at 8:22 AM, Bob Fiering wrote:
> Both my code and the code that Omnis is generating when creating a Window (display grid based on schema or query class) isn't working.
Bob,
A few questions to (hopefully) help you to tease out the issue...
Can you connect to postgres using the Omnis SQL Browser?
Have you used the pgAdmin tool or similar to verify the contents of the database?
Have you captured the SQL statement created by Omnis, and run it using the query browser in pgAdmin?
pgAdmin has a server monitor tool that will help you see how PG is responding to the requests from Omnis. That might give you a clue.
You might write a method to capture all relevant session and statement state information before and after the $select and $fetch. In particular, check $errorcode and $errortext, and in the statement object check $nativeerrorcode and $nativeerrortext.
hth,
- Mark Phillips_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list