Get Value From Connection String
- 09 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Get Value From Connection String
- Updated on 09 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 5.12.0 |
Location | Database > Connection String |
The Get Value From Connection String step gains access to the connection string thanks to its key, grabs it, and exports the connection string value. When wishing to check a parameter, such as Integrated Security, this step may locate its occurrence or lack thereof within the connection string.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Connection String | Database Connection String | String |
Key | The key to get value from in the Connection String | String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | Outputs the value from the Connection String | String |
Example Inputs and Outputs
Connection String | Key | Output |
---|---|---|
Data Source=(local)\SQLEXPRESS;Port=5464;Integrated Security=False;Username=stan;Password=ketmus8! | Password | ketmus8! |
Data Source=(local)\SQLEXPRESS;Port=5464;Integrated Security=False;Username=stan;Password=ketmus8! | Port | 5464 |
Null Value | Port | EXCEPTION MESSAGE |
Empty String | 6 | EXCEPTION MESSAGE |
Common Errors
Value cannot be null
If the Connection String or Key has a null or empty value, an error will occur
To correct this, ensure that the input field is configured correctly.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Value From Connection String 1[GetValueFromConnectionString] in flow [Flow 10]: Exception invoking method GetValueFromConnectionString on class ConnectionStringSteps
---> DecisionsFramework.LoggedException: Exception invoking method GetValueFromConnectionString on class ConnectionStringSteps
---> System.ArgumentNullException: Value cannot be null. (Parameter 'Get Value From Connection String: Unable to parse key Password'
at DecisionsFramework.ServiceLayer.Services.DatabaseIntegration.FlowSteps.ConnectionStringSteps.GetValueFromConnectionString(String connectionString, String key)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Was this article helpful?