> >DbConnectionStringBuilder csb = _Factory.CreateConnectionStringBuilder(); > >. >. >. > >case "System.Data.OleDb": > if (_Provider != "") > { > csb.Add("Provider", _Provider); > } > if (_DataSource != "") > { > csb.Add("Data Source", _DataSource); > } > if (_InitialCatalog != "") > { > csb.Add("Initial Catalog", _InitialCatalog); > } > if (_TrustedConnection) > { > csb.Add("Integrated Security", "SSPI"); > } > else > { > if (_UserName != "") > { > csb.Add("User Id", _UserName); > } > > if (_Password != "") > { > csb.Add("pwd", _Password); > } > } > > break; > >>
>return csb.ConnectionString;
>
>Provider=Microsoft.Jet.OLEDB.4.0;Data Source="M:\APEX Master Database.mdb";Integrated Security=SSPI>
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"M:\\APEX Master Database.mdb\";Integrated Security=SSPI>
/// /// DataSource Property /// public string DataSource { get { return _dataSource; } } private string _dataSource = @"M:\APEX Master Database.mdb...";Like Viv said about the escape characters, the @ sign will negate that.