Skip to main content

We all know K2 can create SmartObjects based on existing schema in a database or service.

 

I'm wondering if it can work the other way around. Can I:

 

1. Set up a SQL Server service instance in K2 and connect it to a database

2. Define a SmartObject in K2 and have that SO definition create a table inside the database that can then be updated and queried as necessary

 

Is this possible? I've looked at the documentation but couldn't find an answer; if I missed it, a link to the relevant docs would be much appreciated. Thanks!

Hi,


 


I don't believe this is possible with the out-of-the box SQL Service broker. Any store procedures/views/table definitions will need to created from your end.


If you create a basic SmartObject in the designer it uses the K2 SmartBox broker.  SmartBox creates tables for you inside the K2 database on SQL server in either the SmartBox or dbo schema depending on the version you are using.  So yes, when using SmartBox it will create the tables for you.


No, that is not possible unless you use the "SmartBox" database which I wouldn't recommend as it is kind of limiting compared to managing your own database.


Thanks David! We're actually looking to create tables inside a custom SQL database, instead of the K2 app database via SmartBoxes, so this solution won't work for us in this case. But it gives me a good reminder about the capabilities of SmartBoxes. Appreciate your responses on both this and my other recent post!


Thanks, Khan. I also got some help from Steve at K2 and his answer purports with yours here. We're currently looking into a custom SQL Server database and will take that plunge shortly.


Reply