SqlObjectName class | QSYS API Reference Guide
Estimated reading time: 4 minutes
Represents a SQL object name.
Namespace: ASNA.DataGate.SqlServer Assembly: ASNA.QSys.DataGate.Client.dll
Inheritance: Object
Remarks
This class is used to encapsulate the name of a SQL object, such as a table or a column. It provides methods to parse and format SQL object names.
Constructors
Name | Description |
---|---|
SqlObjectName(String) | Initializes a new instance of the class with the specified object name. |
SqlObjectName(String, String) | Initializes a new instance of the class with the specified owner and object names. |
SqlObjectName(String, String, String) | Initializes a new instance of the class with the specified database, owner, and object names. |
SqlObjectName(String, String, String, String) | Initializes a new instance of the class with the specified server, database, owner, and object names. |
SqlObjectName(String)
Initializes a new instance of the class with the specified object name.
SqlObjectName(String)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the SQL object. |
SqlObjectName(String, String)
Initializes a new instance of the class with the specified owner and object names.
SqlObjectName(String, String)
Parameters
Type | Parameter name | Description |
---|---|---|
String | owner | The name of the owner. |
String | name | The name of the object. |
SqlObjectName(String, String, String)
Initializes a new instance of the class with the specified database, owner, and object names.
SqlObjectName(String, String, String)
Parameters
Type | Parameter name | Description |
---|---|---|
String | database | The name of the database. |
String | owner | The name of the owner. |
String | name | The name of the object. |
SqlObjectName(String, String, String, String)
Initializes a new instance of the class with the specified server, database, owner, and object names.
SqlObjectName(String, String, String, String)
Parameters
Type | Parameter name | Description |
---|---|---|
String | server | The name of the server. |
String | database | The name of the database. |
String | owner | The name of the owner. |
String | name | The name of the object. |
Properties
Type | Name | Description |
---|---|---|
String | Database | Gets the name of the database. |
String | Object | Gets the name of the object. |
String | Owner | Gets the name of the owner. |
String | Server | Gets the name of the server. |
Methods
Signature | Description |
---|---|
Parse(String) | Parses a string into a SqlObjectName. |
TryParse(String, SqlObjectName&) | Tries to parse a string into a SqlObjectName. |
SqlObjectName Parse(string input)
Parses a string into a SqlObjectName.
Remarks
This method is used to convert a string into a SqlObjectName. The string should be in the format of a SQL object name, such as “server.database.schema.object”. If the string cannot be parsed, an exception is thrown.
SqlObjectName Parse(string input)
Parameters
Type | Parameter name | Description |
---|---|---|
String | input | The string to parse. |
Returns
Type | Description |
---|---|
SqlObjectName | A SqlObjectName that represents the parsed string. |
bool TryParse(string input, SqlObjectName& output)
Tries to parse a string into a SqlObjectName.
Remarks
This method is used to convert a string into a SqlObjectName. The string should be in the format of a SQL object name, such as “server.database.schema.object”. If the string cannot be parsed, the method returns false and assigns null to the result parameter.
bool TryParse(string input, SqlObjectName& output)
Parameters
Type | Parameter name | Description |
---|---|---|
String | input | The string to parse. |
SqlObjectName& | output | When this method returns, contains the SqlObjectName equivalent to the string contained in input, if the conversion succeeded, or null if the conversion failed. |
Returns
Type | Description |
---|---|
Boolean | True if the input was converted successfully; otherwise, false. |