Creating an external object from an external database table - Primary Key - Forum - Rollbase - Progress Community

Creating an external object from an external database table - Primary Key

 Forum

Creating an external object from an external database table - Primary Key

This question is not answered

Hello,

I am trying to create an external object in RB, from an external database VIEW.

I have an ID in this view, of type integer. And this is what I am using as Primary Key in RB.

Are there any restrictions on the type of the column that can be used as Primary Key ? Does it have to be an auto-number? Or any integer is fine?

Because it is not working for me now. The integer I am using as ID is not an auto number.

Thanks

Regards,

All Replies
  • Hi Meryk,

    It should work, Primary key can be a integer column or string column and should be unique field in the table need not have to be Auto Number. Can you please let us know what is not working.

    We tried this at our end it is working as expected.

    Thanks and Regards

    Pradeep

  • Hi Pradeep,

    As I already said in this post:  community.progress.com/.../86549 , the issue came from somewhere else not the primary key. It is because of the name of one column in the View  that was containing a '('.

    I think this restriction should be specified in the documentation, to make sure the column names of the tables we are trying to map to RB do not contain any special characters.

    Thank you

    Meryem

  • We will log and fix this issue. Basically we need to escape for column names with special characters. We support this for table names. Can you share the database type and sample column name that caused issues ?

  • Backend is MySQL.

    And I am mapping a VIEW (not a table) with a column that is a COUNT.

    So because I didn't rename it while building the view, by default the column name was set to : "count(columnToCount)". And this is what causes the issue.

    Thanks

    Meryem