OdbcCommandBuilder.QuoteIdentifier Method

Definition

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier. This includes correctly escaping any embedded quotes in the identifier.

Overloads

QuoteIdentifier(String)

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier. This includes correctly escaping any embedded quotes in the identifier.

QuoteIdentifier(String, OdbcConnection)

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier. This includes correctly escaping any embedded quotes in the identifier.

QuoteIdentifier(String)

Source:
OdbcCommandBuilder.cs
Source:
OdbcCommandBuilder.cs
Source:
OdbcCommandBuilder.cs

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier. This includes correctly escaping any embedded quotes in the identifier.

C#
public override string QuoteIdentifier(string unquotedIdentifier);

Parameters

unquotedIdentifier
String

The original unquoted identifier.

Returns

The quoted version of the identifier. Embedded quotes within the identifier are correctly escaped.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

QuoteIdentifier(String, OdbcConnection)

Source:
OdbcCommandBuilder.cs
Source:
OdbcCommandBuilder.cs
Source:
OdbcCommandBuilder.cs

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier. This includes correctly escaping any embedded quotes in the identifier.

C#
public string QuoteIdentifier(string unquotedIdentifier, System.Data.Odbc.OdbcConnection? connection);
C#
public string QuoteIdentifier(string unquotedIdentifier, System.Data.Odbc.OdbcConnection connection);

Parameters

unquotedIdentifier
String

The original unquoted identifier.

connection
OdbcConnection

When a connection is passed, causes the managed wrapper to get the quote character from the ODBC driver, calling SQLGetInfo(SQL_IDENTIFIER_QUOTE_CHAR). When no connection is passed, the string is quoted using values from QuotePrefix and QuoteSuffix.

Returns

The quoted version of the identifier. Embedded quotes within the identifier are correctly escaped.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)