OdbcConnectionStringBuilder.Dsn 属性
定义
获取或设置与连接关联的数据源名称 (DSN) 的名称。Gets or sets the name of the data source name (DSN) associated with the connection.
public:
property System::String ^ Dsn { System::String ^ get(); void set(System::String ^ value); };
public string Dsn { get; set; }
member this.Dsn : string with get, set
Public Property Dsn As String
属性值
为 Dsn 属性的值,或者,如果未提供任何值,则为 String.Empty。The value of the Dsn property, or String.Empty if none has been supplied.
注解
如果在您尝试设置此属性时传入的值为 null,则将重置 Dsn 属性。If the value passed in is null when you try to set the property, the Dsn property is reset. 如果尚未设置值,而开发人员尝试检索属性,则返回值为 String.Empty 。If the value has not been set and the developer tries to retrieve the property, the return value is String.Empty. 此属性与连接字符串中的 "Dsn" 键相对应。This property corresponds to the "Dsn" key within the connection string.