This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Custom Datatype in sql table

Hello,

I have a custom datatype, which is not view-able through sync editor.

For example below CAMSUser attribute, which is having dependency on that application and not advisable to change the datatype supported by Q1IM7.0

Please advice me on how to proceed further for mapping.

Thanks.

 

Regards,

Vijay

Parents
  • The view is getting to be writeable, as soon as you create your own data operations (either scripting or pattern based).
     
    Which version of 7.0 are you using? (Screenshot is from 7.0.2)
     
    This is the sample code from a snippet for an insert.
     
    IValueStore store = data.Values.CreateValueStore();
    
    connection.ExecuteSqlNonQuery(store.Replace("CREATE USER \"%ColumnName1%\" IDENTIFIED BY \"%ColumnName2%\"", true));
    connection.ExecuteSqlNonQuery(store.Replace("GRANT \"CONNECT\" TO \"%ColumnName1%\"", true));
    
    // Fetch auto-generated primary key from database
    object key = connection.ExecuteSqlScalar(store.Replace("SELECT PKColumn FROM TableName WHERE USERNAME = '%ColumnName1%'", true));
    
    // Return key value (You may have to convert the key to correct datatype)
    return new ScriptBasedDMLStrategyResult("PKColumn", Convert.ToInt64(key));
    
     
    If you use the pattern based data operations you can execute a single line of SQL code and have access to the columns of your view using %columnname%.
     
    Sample for calling a procedure: (from the online documentation)
     
    exec CreateUser('%Uid%','%FirstName%','%LastName%')
     
    Markus
Reply
  • The view is getting to be writeable, as soon as you create your own data operations (either scripting or pattern based).
     
    Which version of 7.0 are you using? (Screenshot is from 7.0.2)
     
    This is the sample code from a snippet for an insert.
     
    IValueStore store = data.Values.CreateValueStore();
    
    connection.ExecuteSqlNonQuery(store.Replace("CREATE USER \"%ColumnName1%\" IDENTIFIED BY \"%ColumnName2%\"", true));
    connection.ExecuteSqlNonQuery(store.Replace("GRANT \"CONNECT\" TO \"%ColumnName1%\"", true));
    
    // Fetch auto-generated primary key from database
    object key = connection.ExecuteSqlScalar(store.Replace("SELECT PKColumn FROM TableName WHERE USERNAME = '%ColumnName1%'", true));
    
    // Return key value (You may have to convert the key to correct datatype)
    return new ScriptBasedDMLStrategyResult("PKColumn", Convert.ToInt64(key));
    
     
    If you use the pattern based data operations you can execute a single line of SQL code and have access to the columns of your view using %columnname%.
     
    Sample for calling a procedure: (from the online documentation)
     
    exec CreateUser('%Uid%','%FirstName%','%LastName%')
     
    Markus
Children
No Data