How to get acces to database views ??

Hello
We use the MAXDB(formerly ADABAS,SAPDB) database for our ‘nonSAP’ applications).
I can access all “normal” tables. They can be seleted from the table list.

Now i want to build a readonly form, that shows some information about our datamodel(tables,columns,columdefinitions,foreign keys,…)

These informations are stored in 2 database views TABES and COLUMNS (schema = DOMAIN).
I have the right to access these views.
var tabs = databaseManger.getdatasetbyquery(server,“select * from tables”,null,-1)
application.output(tabs)
shows the wanted informations.

But these views are not shown in the table list from the server??
So i don’t know how to build forms with these informations(set the datasource, place fields,…)

I tried to configure a new server with the same connection parameters as the original plus schema DOMAIN, but this give me some errors.

How to work (build forms) based on these views???

Best regards
Albert

What errors do you get when you create another connection to this schema ?

Hello Robert
Meanwhile a found a workaround.
I created a view AllTABELLES as normal database user.
Create view ALLTABLES as select * from tables(the internal database view).
This view(ALLTABLES) is shown in the table list an can be used, but i ran into the next problem.
No primary key !!!
Is there a way to define a column as primary key(tablename for example) just inside Servoy ??
(I never want to update,insert,delete something. Just show tablenames,columnnames,foreign keys, same columnnames in different tables,…)
Regards
Albert

abeermann:
Is there a way to define a column as primary key(tablename for example) just inside Servoy ??

You can tell Servoy that a certain column is the row_ident(ifier). Just open the table definitions view in Servoy and you see the row_ident column.

Hope this helps.

Hi,

Be aware that views are not updated in Servoy.
So if You start your application and show a form that is based on a view, that information
is only read once !!

If records are created in the tables that are the base for the view, no new records are shown in
Servoy for that view until you do a databaseManager.refreshRecordFromDatabase(, -1);

Regards,

Hello Robert

Working!
Thank you.

Regards
Albert