ERROR: relation TableName does not exist

View and download documents on various topics e.g. Configuring Ebase Xi under different environmental setups

Moderators: Jon, Steve, Ian, Dave

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

ERROR: relation TableName does not exist

#1

Postby juned_seskoad » Tue Jul 15, 2014 8:36 am

Dear All,

I'm new in Ebase Xi, i was trying create some form and table list with ebase sample database.
Now I want use my database, I create database using postgres, I was connect database, Adding database resource, create Business view, and add table on form. after that iwant display my data on table list on form, using fetchtable TABLENAME;
but it error , from execution log :
Error: SQL error reading from database resource TEST select * from base.TEST
Error: ERROR: relation "base.test" does not exist

Can you help me solve this problem

Regards

Juned
0 x

Hovik
Moderator
Moderator
Posts: 184
Joined: Tue Sep 11, 2007 8:58 am

#2

Postby Hovik » Wed Jul 16, 2014 12:26 pm

Hi Juned,

A few things to check first.

1. Open the database connection used by this resource and click the 'Test Connection' button. Does it work?
2. Does your postgress database include a schema/user called base?
3. Does base include a table called test?
4. Using the database connection tested in step 1, click the 'create resource(s) from database schema' button and import any table creating a new resource.
5. Create a new form which uses a table backed by this new resource - does fetchtable work in this form?

Regards,
Hovik
0 x

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

#3

Postby juned_seskoad » Thu Jul 17, 2014 2:31 am

This is answer of your question

1. Open the database connection used by this resource and click the 'Test Connection' button. Does it work?
it works, Connection test successful.
2. Does your postgress database include a schema/user called base?
yes, this is tree view of postgres
Server
-Database
-->az_dev
---->Schemas
------->base
----------->Tables
--------------->Test

3. Does base include a table called test?
Yes
4. Using the database connection tested in step 1, click the 'create resource(s) from database schema' button and import any table creating
a new resource.
I was do that, TEST (table) will show on IT Element -> External Resource-> Database Resource
5. Create a new form which uses a table backed by this new resource - does fetchtable work in this form?
fetchtable not work
error Message :
SQL error reading from database resource TEST ,ERROR: relation "base.test" does not exist Position: 15
0 x

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

#4

Postby juned_seskoad » Thu Jul 17, 2014 2:45 am

This is capture from my laptop
Image
Image
0 x

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

#5

Postby juned_seskoad » Thu Jul 17, 2014 3:42 am

This is my ebase prject
Image
0 x

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

#6

Postby juned_seskoad » Thu Jul 17, 2014 5:31 am

Dear Sir,

One more ,today i try using mysql database, trying to view table on form and it works using fetchtable, so why on postgres databse it not work for fetchtable ?

Regards

Juned
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#7

Postby Jon » Thu Jul 17, 2014 6:06 am

I think Postgres is case sensitive, so you might try changing the table name in the Database Resource to exactly match the case of the table in the database. Another thing to try would be removing the schema name from the table in the Database Resource i.e. change "base.test" to just "test".
0 x

Kalee
Ebase User
Posts: 1
Joined: Mon Apr 20, 2015 10:25 am

#8

Postby Kalee » Tue Apr 21, 2015 2:42 am

Now I want use my database, I create database using postgres, I was connect database, Adding database resource, create Business view, and add table on form. after that iwant display my data on table list on form, using fetchtable TABLENAME;
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#9

Postby Jon » Tue Apr 21, 2015 6:21 am

It sounds like you are quite close. Make sure the "For use with table operations" checkbox in the Database Resource is checked. Then add a script to the before page event of the page containing the fetchtable statement, then drag the table on to the page.

This tutorial may help: http://dev-docs.verj.io/ufs/doc/tables_tutorial.htm.

From your post I'm not sure if you want to display the data as a table (as above) or as a list. Lists are different - to do this, you need to create a Dynamic List then link this to a form field. You can create a Dynamic List from a Database Resource by clicking the Build Dynamic List icon on the toolbar of the Database Resource Editor.
0 x


Who is online

Users browsing this forum: No registered users and 5 guests