diff --git a/content/en/docs/2023.11/Reference/Blocks/data/execute-data-command/execute-data-command-block-1.md b/content/en/docs/2023.11/Reference/Blocks/data/execute-data-command/execute-data-command-block-1.md index 6b092079f..a284879cd 100644 --- a/content/en/docs/2023.11/Reference/Blocks/data/execute-data-command/execute-data-command-block-1.md +++ b/content/en/docs/2023.11/Reference/Blocks/data/execute-data-command/execute-data-command-block-1.md @@ -509,11 +509,12 @@ The exceptions thrown by the block can be found below: | [CommandException][] | Thrown when the data source was not found or was not accessible. | | | Thrown when an error occurs whilst trying to open a new connection. | | | Thrown when a connection is successfully established but an error occurred during the login process. | -| | Thrown when the [Command][Command Property] contains syntax errors. The error will contain a nested [SqlException][] with a corresponding [SqlException Error Code][SqlException Error Codes]. | +| | Thrown when the [Command][Command Property] contains syntax errors. The error will contain either a nested [SqlException][] with a corresponding [SqlException Error Code][SqlException Error Codes], or a nested [ParserException][] (Oracle Only). | | | Thrown when the [Command][Command Property] is invalid for the table specified. | | | Thrown when the [Command][Command Property] references a non-existent stored procedure. | | | Thrown when parameters derives from [Array][] or [IEnumerable][] when a [Query Statement][Query Statements] is executed. | | | Thrown when an [Command][] contains multiple statements. | +| | Thrown when a [Command][] or [Commands][] contains an [OracleBlockStatement][] statements. (Oracle Only)| ## Remarks @@ -585,7 +586,7 @@ For a [Non Query Statement][Non Query Statements] (e.g. insert, update, delete, | [Result][Result Property] will be set to                                                                                        | when | |-|-| -| `null` | always, as [Non Query Statements][] do not return data | +| `[]` | always, as [Non Query Statements][] do not return data | Note use a [QueryCommand][] for commands that have dependency between their statements (e.g. Cursors and Variables) and return data from the data source. Please see [Complex Commands][] for more information. @@ -742,6 +743,7 @@ When using a [Parameterised Command][Parameterised Commands] to execute a stored [ConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.ConnectionDetails.MainDoc" >}} [SqlServerConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} [OdbcConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OdbcConnectionDetails.MainDoc" >}} [Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} [dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} @@ -783,4 +785,5 @@ When using a [Parameterised Command][Parameterised Commands] to execute a stored [Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} [SQL Injection]: {{< url path="W3.SqlInjection" >}} diff --git a/content/en/docs/2023.11/Reference/Concepts/working-with/data-sources/supported-data-sources/oracle.md b/content/en/docs/2023.11/Reference/Concepts/working-with/data-sources/supported-data-sources/oracle.md new file mode 100644 index 000000000..3d0f2d832 --- /dev/null +++ b/content/en/docs/2023.11/Reference/Concepts/working-with/data-sources/supported-data-sources/oracle.md @@ -0,0 +1,40 @@ +--- +title: "Oracle" +linkTitle: "Oracle" +description: "Information regarding Oracle as a data source." +--- + +# {{% param title %}} + +{{< workinprogress >}} + +## Summary + +TODO: + +- Summary +- Table or other format to display verified data sources (e.g. postgres, mysql, access, excel, oracle) and examples (link to connection strings) + +## Remarks + +### Known Limitations + +TODO + +## See Also + +### Related Concepts + +TODO + +### Related Data Types + +TODO + +### Related Blocks + +TODO + +### External Documentation + +TODO diff --git a/content/en/docs/2023.11/Reference/Exceptions/data/command-exception.md b/content/en/docs/2023.11/Reference/Exceptions/data/command-exception.md index 914a2510a..130629f25 100644 --- a/content/en/docs/2023.11/Reference/Exceptions/data/command-exception.md +++ b/content/en/docs/2023.11/Reference/Exceptions/data/command-exception.md @@ -8,63 +8,239 @@ description: "Exception thrown when any command execution has resulted in an exc

(Cortex.Exceptions.Data.CommandException)

+## Description + Exception thrown when any command execution has resulted in an exception being thrown. -The format of the exception message is as follows: +## Reasons + +### Connection Failed {#connection} + +The connection to the data source failed. + +#### Message Format + +The format of the [Message][] is as follows: ```json -"TODO. +"Failed to open the '' connection. Please click the HelpLink for more information on how to fix this." ``` -TODO: This is an example of how we can do exceptions with categories and error codes - -| Category | Error Code | Notes | -|--------------------|--------------|------------------------------------------| -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | -| BasicCredentials | 300 | Some notes | -| | 301 | Some notes | -| | 302 | Some notes | - -## BasicCredentials.AccessTokenUri - -### 300 +where: + +- `` is the type of the database (e.g. SqlServer, Oracle). #### How to fix -TODO: +Make sure that the [Connection Details Property][ConnectionDetailsProperty] has been given a valid connection string, and that the data source is active. -### 301 +More information on why the value is invalid, or instruction on how to provide a valid value, may be present in the [InnerException][]. + +### Incompatible Statement Type (Oracle Only) {#incompatiblestatementtype} + +An [OracleBlockStatement][] has been used in the [Command Property][CommandProperty] when using a [Command][] or [Commands][] data type. + +#### Message Format + +The format of the [Message][] is as follows: + +```json +"'CommandText' contains a block statement; it must be provided with a non-block statement. +Please click the HelpLink for more information on how to fix this." +``` #### How to fix -TODO: +Use a [QueryCommand][] or [NonQueryCommand][] data type. + +### Multiple Statements {#multiplestatements} + +Multiple statements have been passed into the [Command Property][CommandProperty] when using a [Command][] data type. -### 302 +#### Message Format + +The format of the [Message][] is as follows: + +```json +"'CommandText' contains multiple statements; it must be provided with a single statement. +Please click the HelpLink for more information on how to fix this." +``` #### How to fix -TODO: \ No newline at end of file +Use a [Commands][] data type. + +### Runtime {#runtime} + +An error has occurred during either parsing or execution of the statement(s). + +#### Message Format + +The format of the [Message][] is as follows: + +```json +"An error occurred whilst trying to execute the command provided. Please see the 'StatementExceptions' property for more details. +Please click the HelpLink for more information on how to fix this." +``` + +#### How to fix + +Try to make sure that the statement(s) are valid. + +More information on why the value is invalid, or instruction on how to provide a valid value, may be present in the [StatementExceptions][]. + +## Properties + +### Exception Type + +The type of the exception (i.e. `CommandException`). + +| | | +|-----------|------------| +| Data Type | [String][] | + +### Message + +The exception message, providing information about the exception that occurred. + +| | | +|-----------|------------| +| Data Type | [String][] | + +### Category + +The category of the exception, which is used to categorise an exception if there are multiple reasons that the exception can occur. + +For `CommandException` there are the following categories: + +- `Connection` +- `IncompatibleStatementType` +- `MultipleStatements` +- `Runtime` + +| | | +|-----------|------------| +| Data Type | [String][] | + +### InnerException + +An optional property that may contain the exception that caused the current exception. + +| | | +|-----------|---------------| +| Data Type | [Exception][] | + +### StatementExceptions + +An optional property that may contain a list of exception(s) relating to the execution of one or more of the statements specified in the [Command Property][CommandProperty]. + +| | | +|-----------|---------------| +| Data Type | [List][]<[Exception][]> | + +### Help Link + +The URL for the relevant section of this exception's help page. + +| | | +|-----------|------------| +| Data Type | [String][] | + +## Remarks + +### Known Limitations + +None + +## See Also + +### Related Data Types + +- [Command][] +- [Commands][] +- [ConnectionDetails][] +- [Exception][] +- [NonQueryCommand][] +- [OdbcConnectionDetails][] +- [OracleConnectionDetails][] +- [QueryCommand][] +- [SqlServerConnectionDetails][] +- [String][] + +### Related Concepts + +- [Exceptions][] +- [Working With Data Sources][] + +### Related Blocks + +- Data + - [Execute Data Command][] + +### External Documentation + +[OracleBlockStatement][] + +[Message]: {{< ref "#message" >}} +[InnerException]: {{< ref "#innerexception" >}} +[StatementExceptions]: {{< ref "#statementexceptions" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[InvalidConnectionStringException]: {{< url path="Cortex.Reference.Exceptions.Data.InvalidConnectionStringException.MainDoc" >}} +[CommandException]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.MainDoc" >}} + +[ConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.ConnectionDetails.MainDoc" >}} +[SqlServerConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} +[OdbcConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OdbcConnectionDetails.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Execute Data Command]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.MainDoc" >}} + +[TConnectionDetails]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[List]: {{< url path="Cortex.Reference.DataTypes.Collections.List.MainDoc" >}} +[Structure]: {{< url path="Cortex.Reference.DataTypes.Collections.Structure.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Array]: {{< url path="Cortex.Reference.DataTypes.Collections.Array.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[ConnectionDetailsProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ConnectionDetailsProperty" >}} +[DataCommand]: {{< url path="Cortex.Reference.DataTypes.Data.DataCommand.MainDoc" >}} +[DataCommand.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.DataCommand.CommandText" >}} + +[Command]: {{< url path="Cortex.Reference.DataTypes.Data.Command.MainDoc" >}} +[Command.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.Command.CommandText" >}} + +[Commands]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.MainDoc" >}} +[Commands.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.CommandText" >}} + +[QueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.MainDoc" >}} +[QueryCommand.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.CommandText" >}} + +[NonQueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.MainDoc" >}} +[NonQueryCommand.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.CommandText" >}} + +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} +[Variable Editor]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[String Interpolation]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.ConvertingObjectsToText.StringInterpolation" >}} +[Working with Data Sources]: {{< url path="Cortex.Reference.Concepts.WorkingWith.DataSources.MainDoc" >}} +[Connection String Formats]: {{< url path="ConnectionStrings.MainDoc" >}} +[Variables]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Variables.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} + +[Exceptions]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.MainDoc" >}} + +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/command.md b/content/en/docs/2023.11/Reference/data-types/data/command.md index 854fec24a..08f6a6c0a 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/command.md +++ b/content/en/docs/2023.11/Reference/data-types/data/command.md @@ -99,6 +99,10 @@ Currently, if the `ToString()` method is used on a `Command`, then its Full Name In future this limitation may be removed. +#### Block Statements Incompatible (Oracle Only) + +Using an [OracleBlockStatement][] in the [CommandText][] will throw a [Command Exception][CommandExceptionIncompatibleStatementType]. You must use either a [QueryCommand][] or [NonQueryCommand][] instead. + ## See Also ### Related Data Types @@ -114,6 +118,7 @@ In future this limitation may be removed. ### External Documentation +* [OracleBlockStatement][] * [SQL Injection][] [CommandText]: {{< ref "#command-text" >}} @@ -128,6 +133,7 @@ In future this limitation may be removed. [Executing Multiple Commands (Unsafe)]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ExecutingMultipleCommandsUnsafe" >}} [Block: Parameterised Commands]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ParameterisedCommands" >}} [Statements]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.Statements" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} [Convert Object To Text]: {{< url path="Cortex.Reference.Blocks.Objects.ConvertObject.ConvertObjectToText.MainDoc" >}} [Convert Object To Json]: {{< url path="Cortex.Reference.Blocks.Json.ConvertJson.ConvertObjectToJson.MainDoc" >}} @@ -140,5 +146,11 @@ In future this limitation may be removed. [Commands]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.MainDoc" >}} [QueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.MainDoc" >}} [NonQueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.MainDoc" >}} +[CommandException]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.MainDoc" >}} +[CommandExceptionIncompatibleStatementType]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.IncompatibleStatementType" >}} +[ConnectionDetailsProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ConnectionDetailsProperty" >}} +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[Command]: {{< url path="Cortex.Reference.DataTypes.Data.Command.MainDoc" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} [SQL Injection]: {{< url path="W3.SqlInjection" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/commands.md b/content/en/docs/2023.11/Reference/data-types/data/commands.md index 62b5c124a..55739670e 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/commands.md +++ b/content/en/docs/2023.11/Reference/data-types/data/commands.md @@ -99,6 +99,10 @@ Currently, if the `ToString()` method is used on a `Commands`, then its Full Nam In future this limitation may be removed. +#### Block Statements Incompatible (Oracle Only) + +Using an [OracleBlockStatement][] in the [CommandText][] will throw a [Command Exception][CommandExceptionIncompatibleStatementType]. You must use either a [QueryCommand][] or [NonQueryCommand][] instead. + ## See Also ### Related Data Types @@ -114,6 +118,7 @@ In future this limitation may be removed. ### External Documentation +* [OracleBlockStatement][] * [SQL Injection][] [CommandText]: {{< ref "#command-text" >}} @@ -128,6 +133,7 @@ In future this limitation may be removed. [Executing Multiple Commands (Unsafe)]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ExecutingMultipleCommandsUnsafe" >}} [Block: Parameterised Commands]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ParameterisedCommands" >}} [Statements]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.QueryStatements" >}} +[Commands]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.MainDoc" >}} [Convert Object To Text]: {{< url path="Cortex.Reference.Blocks.Objects.ConvertObject.ConvertObjectToText.MainDoc" >}} [Convert Object To Json]: {{< url path="Cortex.Reference.Blocks.Json.ConvertJson.ConvertObjectToJson.MainDoc" >}} @@ -140,5 +146,11 @@ In future this limitation may be removed. [Command]: {{< url path="Cortex.Reference.DataTypes.Data.Command.MainDoc" >}} [QueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.MainDoc" >}} [NonQueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.MainDoc" >}} +[ConnectionDetailsProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.ConnectionDetailsProperty" >}} +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} +[CommandException]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.MainDoc" >}} +[CommandExceptionIncompatibleStatementType]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.IncompatibleStatementType" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} [SQL Injection]: {{< url path="W3.SqlInjection" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/connectiondetails.md b/content/en/docs/2023.11/Reference/data-types/data/connectiondetails.md index aad5a74d8..56edd3425 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/connectiondetails.md +++ b/content/en/docs/2023.11/Reference/data-types/data/connectiondetails.md @@ -29,22 +29,25 @@ Any data type representing configuration for establishing and maintaining a conn Any of the following data types can be used where a `ConnectionDetails` is required: -- [SqlServerConnectionDetails][] - [OdbcConnectionDetails][] +- [OracleConnectionDetails][] +- [SqlServerConnectionDetails][] ### Create a ConnectionDetails For some of the ways that a `ConnectionDetails` can be created, please see each of the `ConnectionDetails` data types: -- [SqlServerConnectionDetails][] - [OdbcConnectionDetails][] +- [OracleConnectionDetails][] +- [SqlServerConnectionDetails][] ### Convert ConnectionDetails to Text For some of the ways that a `ConnectionDetails` can be converted to text, please see each of the `ConnectionDetails` data types: -- [SqlServerConnectionDetails][] - [OdbcConnectionDetails][] +- [OracleConnectionDetails][] +- [SqlServerConnectionDetails][] ### Known limitations @@ -54,8 +57,9 @@ None ### Related Data Types -- [SqlServerConnectionDetails][] - [OdbcConnectionDetails][] +- [OracleConnectionDetails][] +- [SqlServerConnectionDetails][] ### Related Concepts @@ -69,3 +73,4 @@ None [SqlServerConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails.MainDoc" >}} [OdbcConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OdbcConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} \ No newline at end of file diff --git a/content/en/docs/2023.11/Reference/data-types/data/nonquerycommand.md b/content/en/docs/2023.11/Reference/data-types/data/nonquerycommand.md index 9d6eb8075..388c39ba9 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/nonquerycommand.md +++ b/content/en/docs/2023.11/Reference/data-types/data/nonquerycommand.md @@ -99,6 +99,10 @@ Currently, if the `ToString()` method is used on a `NonQueryCommand`, then its F In future this limitation may be removed. +#### Multiple SQL Commands (Oracle Only) + +For Oracle you must use [block statement syntax][OracleBlockStatement] to execute multiple commands, otherwise a [CommandException][CommandExceptionRuntime] will be thrown. + ## See Also ### Related Data Types @@ -114,6 +118,7 @@ In future this limitation may be removed. ### External Documentation +* [OracleBlockStatement][] * [SQL Injection][] [CommandText]: {{< ref "#command-text" >}} @@ -140,5 +145,8 @@ In future this limitation may be removed. [Command]: {{< url path="Cortex.Reference.DataTypes.Data.Command.MainDoc" >}} [Commands]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.MainDoc" >}} [QueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.MainDoc" >}} +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[CommandExceptionRuntime]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.Runtime" >}} -[SQL Injection]: {{< url path="W3.SqlInjection" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} +[SQL Injection]: {{< url path="W3.SqlInjection" >}} \ No newline at end of file diff --git a/content/en/docs/2023.11/Reference/data-types/data/odbcconnectiondetails.md b/content/en/docs/2023.11/Reference/data-types/data/odbcconnectiondetails.md index e6c5b051f..44036a187 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/odbcconnectiondetails.md +++ b/content/en/docs/2023.11/Reference/data-types/data/odbcconnectiondetails.md @@ -73,6 +73,7 @@ Please see [Working with Data Sources][] for a list of other supported data sour ### Related Data Types * [ConnectionDetails][] +* [OracleConnectionDetails][] * [SqlServerConnectionDetails][] ### Related Concepts @@ -91,6 +92,7 @@ Please see [Working with Data Sources][] for a list of other supported data sour [Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} [ConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.ConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} [SqlServerConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails.MainDoc" >}} [Working with Data Sources]: {{< url path="Cortex.Reference.Concepts.WorkingWith.DataSources.MainDoc" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/oracleconnectiondetails.md b/content/en/docs/2023.11/Reference/data-types/data/oracleconnectiondetails.md new file mode 100644 index 000000000..6712f85f8 --- /dev/null +++ b/content/en/docs/2023.11/Reference/data-types/data/oracleconnectiondetails.md @@ -0,0 +1,114 @@ +--- +title: "OracleConnectionDetails" +linkTitle: "OracleConnectionDetails" +description: "The data type representing configuration for establishing and maintaining a connection to an Oracle data source." +--- + +# {{% param title %}} + +

(Cortex.DataTypes.Data.OracleConnectionDetails)

+ +## Summary + +The `OracleConnectionDetails` data type is used to establish and maintain a connection to an Oracle data source. + +| | | +|-|-| +| **Category:** | Data | +| **Name:** | `OracleConnectionDetails` | +| **Full Name:** | `Cortex.DataTypes.Data.OracleConnectionDetails` | +| **Alias:** | N/A | +| **Description:** | The data type representing configuration for establishing and maintaining a connection to an Oracle data source. | +| **Default Value:** | `null` | +| **Can be used as:** | `ConnectionDetails`, `Object`, `dynamic` | +| **Can be cast to:** | N/A | + +## Properties + +### Connection String + +The Connection String that is used to connect to an Oracle data source. + +| | | +|--------------------|---------------------------| +| Data Type | [EncryptableText][] | +| Is Advanced | `false` | +| Default Editor | [Expression][] | +| Default Value | [EncryptableText][] with value `$@"Data Source=Connection String;"` | + +## Remarks + +### Create an OracleConnectionDetails + +The following table shows some of the ways that an `OracleConnectionDetails` can be created. + +| Method | Example | Result | Editor Support | Notes | +|-|-|-|-|-| +| Use an `OracleConnectionDetails` constructor | `new OracleConnectionDetails("Data Source=Connection String;")` | `{connectionString: $@"Data Source=Connection String;"}` | Expression | | + +An `OracleConnectionDetails` can also be created using the Literal Editor by filling in the necessary values for the following properties: + +| Property | Data Type | Example | Notes | +|-|-|-|-| +| `Connection String`| `EncryptableText`| `$@"Data Source=Connection String;"` | The Connection String that is used to connect to an Oracle database. | + +### Connection Strings + +A [Connection String][] must be provided in order to connect to an Oracle data source. The [Connection String][] can be formatted differently depending on the way the connection will be created and maintained (e.g. Windows user authentication vs TNS). See [ConnectionStrings.com][] for a list of Oracle connection strings. + +Please see [Working with Data Sources][] for a list of other supported data sources (e.g. SQL Server) and how to construct valid connection strings for them. + +### Property Editor Support + +* The Expression Editor is available for [Input][] properties where the data type is `OracleConnectionDetails`. +* The Literal Editor is not available for [Input][] properties where the data type is `OracleConnectionDetails`. +* The Variable Editor is available for [Input][], [InputOutput][] and [Output][] properties where the data type is `OracleConnectionDetails`. + +### Known limitations + +* When using the [OracleConnectionDetails][] to execute multiple commands in the [Command Property][CommandProperty] (using the [QueryCommand][] or [NonQueryCommand][] datatype), as Oracle uses PL/SQL, you must use the block statement syntax. See [OracleBlockStatement][] for more. + +* The [Integrated Security][OracleIntegratedSecurityConnectionString] connection string format is not supported. + +## See Also + +### Related Data Types + +* [ConnectionDetails][] +* [OdbcConnectionDetails][] +* [SqlServerConnectionDetails][] + +### Related Concepts + +* [Working with Data Sources][] + +### External Documentation + +* [ConnectionStrings.com][] +* [OracleBlockStatement][] + +[Connection String]: {{< ref "#connection-string" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[ConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.ConnectionDetails.MainDoc" >}} +[OdbcConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OdbcConnectionDetails.MainDoc" >}} +[SqlServerConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} + +[QueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.MainDoc" >}} +[QueryCommand.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.QueryCommand.CommandText" >}} +[NonQueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.MainDoc" >}} +[NonQueryCommand.CommandText]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.CommandText" >}} + +[Working with Data Sources]: {{< url path="Cortex.Reference.Concepts.WorkingWith.DataSources.MainDoc" >}} + +[EncryptableText]: {{< url path="Cortex.Reference.DataTypes.Text.EncryptableText.MainDoc" >}} + +[ConnectionStrings.com]: {{< url path="ConnectionStrings.OracleConnection" >}} +[OracleIntegratedSecurityConnectionString]: {{< url path="ConnectionStrings.OracleConnectionIntegratedSecurity" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/querycommand.md b/content/en/docs/2023.11/Reference/data-types/data/querycommand.md index 59d43a4f8..4aa4eb394 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/querycommand.md +++ b/content/en/docs/2023.11/Reference/data-types/data/querycommand.md @@ -99,6 +99,10 @@ Currently, if the `ToString()` method is used on a `QueryCommand`, then its Full In future this limitation may be removed. +#### Multiple SQL Commands (Oracle Only) + +For Oracle you must use [block statement syntax][OracleBlockStatement] to execute multiple commands, otherwise a [CommandException][CommandExceptionRuntime] will be thrown. + ## See Also ### Related Data Types @@ -114,6 +118,7 @@ In future this limitation may be removed. ### External Documentation +* [OracleBlockStatement][] * [SQL Injection][] [CommandText]: {{< ref "#command-text" >}} @@ -140,5 +145,8 @@ In future this limitation may be removed. [Command]: {{< url path="Cortex.Reference.DataTypes.Data.Command.MainDoc" >}} [Commands]: {{< url path="Cortex.Reference.DataTypes.Data.Commands.MainDoc" >}} [NonQueryCommand]: {{< url path="Cortex.Reference.DataTypes.Data.NonQueryCommand.MainDoc" >}} +[CommandProperty]: {{< url path="Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand.CommandProperty" >}} +[CommandExceptionRuntime]: {{< url path="Cortex.Reference.Exceptions.Data.CommandException.Runtime" >}} +[OracleBlockStatement]: {{< url path="Oracle.PL-SQL.BlockStatement" >}} [SQL Injection]: {{< url path="W3.SqlInjection" >}} diff --git a/content/en/docs/2023.11/Reference/data-types/data/sqlserverconnectiondetails.md b/content/en/docs/2023.11/Reference/data-types/data/sqlserverconnectiondetails.md index 93777c849..29d0e3856 100644 --- a/content/en/docs/2023.11/Reference/data-types/data/sqlserverconnectiondetails.md +++ b/content/en/docs/2023.11/Reference/data-types/data/sqlserverconnectiondetails.md @@ -74,6 +74,7 @@ None * [ConnectionDetails][] * [OdbcConnectionDetails][] +* [OracleConnectionDetails][] ### Related Concepts @@ -92,6 +93,7 @@ None [ConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.ConnectionDetails.MainDoc" >}} [OdbcConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OdbcConnectionDetails.MainDoc" >}} +[OracleConnectionDetails]: {{< url path="Cortex.Reference.DataTypes.Data.OracleConnectionDetails.MainDoc" >}} [Working with Data Sources]: {{< url path="Cortex.Reference.Concepts.WorkingWith.DataSources.MainDoc" >}} diff --git a/data/urls.toml b/data/urls.toml index 486aed37a..50d4567b3 100644 --- a/data/urls.toml +++ b/data/urls.toml @@ -406,6 +406,8 @@ MainDoc = "/docs/reference/blocks/data/execute-data-command" [Cortex.Reference.Blocks.Data.ExecuteDataCommand.ExecuteDataCommand] MainDoc = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1" + CommandProperty = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1/#command" + ConnectionDetailsProperty = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1/#connection-details" ExecutingMultipleCommandsSafe = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1/#executing-multiple-commands-safe" ExecutingMultipleCommandsUnsafe = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1/#executing-multiple-commands-unsafe" ParameterisedCommands = "/docs/reference/blocks/data/execute-data-command/execute-data-command-block-1/#parameterised-commands" @@ -1390,6 +1392,8 @@ MainDoc = "/docs/reference/data-types/data/connectiondetails" [Cortex.Reference.DataTypes.Data.OdbcConnectionDetails] MainDoc = "/docs/reference/data-types/data/odbcconnectiondetails" + [Cortex.Reference.DataTypes.Data.OracleConnectionDetails] + MainDoc = "/docs/reference/data-types/data/oracleconnectiondetails" [Cortex.Reference.DataTypes.Data.SqlServerConnectionDetails] MainDoc = "/docs/reference/data-types/data/sqlserverconnectiondetails" [Cortex.Reference.DataTypes.DateAndTime] @@ -1804,6 +1808,8 @@ MainDoc = "/docs/reference/exceptions/data/" [Cortex.Reference.Exceptions.Data.CommandException] MainDoc = "/docs/reference/exceptions/data/command-exception/" + IncompatibleStatementType = "/docs/reference/exceptions/data/command-exception/#incompatiblestatementtype" + Runtime = "/docs/reference/exceptions/data/command-exception/#runtime" [Cortex.Reference.Exceptions.Data.InvalidConnectionStringException] MainDoc = "/docs/reference/exceptions/data/invalid-connection-string-exception/" [Cortex.Reference.Exception.DataStorage] @@ -2114,6 +2120,8 @@ [ConnectionStrings] MainDoc = "https://www.connectionstrings.com/" SqlConnection = "https://www.connectionstrings.com/sqlconnection/" + OracleConnection = "https://www.connectionstrings.com/oracle-data-provider-for-net-odp-net/" + OracleConnectionIntegratedSecurity = "https://www.connectionstrings.com/oracle-data-provider-for-net-odp-net/using-integrated-security/" [ElasticSearch] MainDoc = "https://www.elastic.co/" [ErlangOTP] @@ -2432,6 +2440,9 @@ [MSSupport] [MSSupport.Troubleshooting] DynamicPorts = "https://support.microsoft.com/kb/929851" +[Oracle] + [Oracle.PL-SQL] + BlockStatement = "https://blogs.oracle.com/connect/post/building-with-blocks" [Particular] [Particular.NServiceBus] MainDoc = "https://particular.net/nservicebus"