setting a view to a form

I have created a view and it showed in the dataprovider dialog. When I set that to a form and go to the browse mode it throws the following error:

Cannot work without primaryKey on table ‘test_view’

Also in the data provider dialog when tried to set the primary key field “Sequence Type” to db identity it shows the following error:

No primary key specified on table

Servoy just needs to know what column is the row identifier. When the table doesn’t have one defined as such in the database you can tell Servoy what should be used in the dataproviders (see row ident column).

Hope this helps.

Thanks Robert,

That worked. I had been silly to overlook this stuff.

Thanks!

Hi. I can’t find this “row indent” you mention.

I am trying to use a sql server view (not a table) as dataprovider for a form. The view contains the primary key from one table and is still primary key for the result set. The problem is that Servoy is returning this error com.servoy.j2db.persistence.RepositoryException: Cannot work without primaryKey on table ‘vw_rep_cntr’

How can I convince Servoy to accept this view? How can I set the primary key in the set as row identifier?

Thanks,
Raluca

Hi. I can’t find this “row indent” you mention.

I am trying to use a sql server view (not a table) as dataprovider for a form. The view contains the primary key from one table and is still primary key for the result set. The problem is that Servoy is returning this error com.servoy.j2db.persistence.RepositoryException: Cannot work without primaryKey on table ‘vw_rep_cntr’

How can I convince Servoy to accept this view? How can I set the primary key in the set as row identifier?

Thanks,
Raluca

Hi Raluca,

When you go into the Dataproviders window you can select your tables from the tree on the left. Then in the Columns tabpanel you see the columns defined in that selected table. When you click in the Row Ident column of the grid you see you get a popup menu where you can select Row_Ident.
That’s where you set any row ident for tables that have none.

Hope this helps.

It helped a lot Robert!
Thank you!
Raluca