How to create an object from SQL over Object Layer

I would like to create an object from SQL and would like to use object layer instead of using INSERT.

There is procedure QBM_PJobCreate_HOInsert which can be use but not sure how I can generate UID/XObjectKey?

I found function newid() but it's generating GUID without CCC in front - can I just concat it?

Is there function which create XObjectKey from table name and UID?

Is there other easier way of creating those objects by SQL?

Parents
  • To answer your two questions:

    -- Function to create a Module-GUID
    dbo.qbm_fcvGuidtoTransfer(newid(),'CCC')
    
    -- Function(s) to create an XObjectKey
    -- Tables with one PK
    dbo.qbm_fcvelementtoobjectkey1('tablename','pk_columnname','pk_value')
    -- Tables with two PK
    dbo.qbm_fcvelementtoobjectkey2('tablename','pk_columnname1','pk_value1', 'tablename2','pk_columnname2','pk_value2')
    

Reply
  • To answer your two questions:

    -- Function to create a Module-GUID
    dbo.qbm_fcvGuidtoTransfer(newid(),'CCC')
    
    -- Function(s) to create an XObjectKey
    -- Tables with one PK
    dbo.qbm_fcvelementtoobjectkey1('tablename','pk_columnname','pk_value')
    -- Tables with two PK
    dbo.qbm_fcvelementtoobjectkey2('tablename','pk_columnname1','pk_value1', 'tablename2','pk_columnname2','pk_value2')
    

Children
No Data