Skip to main content


 

Symptoms


I am trying to change the data type for a column in a smartobject.
In designer, I changed it from 'Text' to 'Memo' saved changes and finished. However, when I look at this smartobject in K2 database at SQL Server the data type is not changed as I saw in the designer. It still says 'nvarchar(100)' as before I made change. It's supposed to be 'nvarchar(MAX)' for memo.
 

Diagnoses


Unfortunately the SQL table is created when the SmartObject is created. Changing the Property of a SmartObject will not alter the SQL table.

 

Resolution

The steps below will require the table to be dropped and recreated. If there is any data in the table, it will be lost.
You can save the contents of the table to an excel file SQL Manager and then import into the recreated table.

Depending on your database setup, you may not be able to make the change in step 3. In this instance, create a new table and then follow from step 4.

To get the change, please do the following:
1. Open SQL Management studio
2. Right click the table and select Modify
3. Alter the table and select save (your schema may not allow saving)
4. Open BinSmartObject Service Tester.exe
5. Refresh the SQL service instance
6. Navigate to the SQL table
7. Right click and select 'Create SmartObject'
8. Name the SmartObject the same as the existing one and store it in the same folder
9. Click the 'get existing GUID' button
10. Click 'Publish SmartObject'
11. You will be prompted to overwrite the existing SmartObject
12. Select 'Yes'

By using the existing GUID, the SmartObject will still be connected to the viewsforms and you will not need to update them individually.




 
Be the first to reply!

Reply