DB2CommandBuilder.QuotePrefix Property

Gets or sets the beginning character or characters to use when working with database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Property QuotePrefix As String
[C#]
public string QuotePrefix {get; set;}
[C++]
public: __property String* get_QuotePrefix();
public: __property void set_QuotePrefix(String*);
[JScript]
public function get QuotePrefix() : String;
public function set QuotePrefix(String);

Property value

The beginning character or characters to use. The default is an empty string.

Exceptions

Exception type Condition
InvalidOperationException This property cannot be changed after an insert, update, or delete command has been generated.

Remarks

Some databases may contain objects whose names include characters such as spaces, commas, and semicolons. To accommodate this, use the QuotePrefix and QuoteSuffix properties to specify delimiters, such as a left and right bracket, that will encapsulate the object name.

Note: Although you cannot change the QuotePrefix or QuoteSuffix properties after an insert, update, or delete command has been generated, you can change their settings after calling the Update method of a DB2®DataAdapter.