cancel
Showing results for 
Search instead for 
Did you mean: 

connect using connection string

George_Tarasi
Star Contributor
Star Contributor

We have created a connection string using the Unity API Project Configuration, Tools, Connection Strings.

How do we initiate the connection using the Unity API C#?  The goal is to use this for an external autofill keyword set.

7 REPLIES 7

Sean_Killian
Elite Collaborator
Elite Collaborator

Hi, George,

Use the Hyland.Unity.Application.Configuration.GetConnection function to get an IDbConnection by its name as specified in Studio.

Note that you can only use these connection strings from scripts running on the Application Server.  The returned IDbConnection will always be null if attempted from client-side Unity Scripts.

Thanks Sean! If the connection string is used for an external autofill kw set, will it return null if accessed from a client?

Sean_Killian
Elite Collaborator
Elite Collaborator
Just to make sure I understand: Are you talking about an IExternalAutofillKeysetScript implementation?

George_Tarasi
Star Contributor
Star Contributor
Yes, that is correct.