Solved

How to avoid auto generated immutable field in sql smo

  • 14 October 2019
  • 5 replies
  • 11 views

Hello,

 

we have created a table and the table has a column like below.

StartDateTime] [datetime2](7) GENERATED ALWAYS AS ROW START NOT NULL,
[EndDateTime] [datetime2](7) GENERATED ALWAYS AS ROW END NOT NULL,

 

These both generate automatic so we don't need to pass by SMO but k2 object is taking as mandatory to this feild and when I pass this value to SQL, SQL throw error as this generates by SQL.

 

How can we handle this in k2?

icon

Best answer by ProInception 8 November 2019, 17:48

View original

5 replies

Badge +15

Hi,


If you have a field that are autogenerated, you have to edit the SmartObject in Designer, and uncheck the required property for that particular field, and save the changes.


 


 

sorry this doest work, I tried.

Badge +15

In that case, please upload a copy of the full error message you are getting.

I solved it by own. you have to make the field hidden on SQL side to avoid in SMO.

Badge +4

Thank you thank you @ProInception 

I was wondering how I was going to get around this, and your solution worked perfectly.

Reply