OleDbCommandBuilder.QuoteIdentifier Method (String, OleDbConnection)


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.

Namespace:   System.Data.OleDb
Assembly:  System.Data (in System.Data.dll)

public string QuoteIdentifier(
	string unquotedIdentifier,
	OleDbConnection connection


Type: System.String

The unquoted identifier to be returned in quoted format.

Type: System.Data.OleDb.OleDbConnection

When a connection is passed, causes the managed wrapper to get the quote character from the OLE DB provider. When no connection is passed, the string is quoted using values from QuotePrefix and QuoteSuffix.

Return Value

Type: System.String

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

.NET Framework
Available since 2.0
Return to top