asp.net web api - What is the format of a .NET connection string? -
i can find dozens of examples of connectionstring
entry in web.config, there appears no comprehensive definition of values in string. following mean:
- data source -- appears server identity, misinterpretation
- initial catalog
- attachdbfilename -- seems file name of db file, how relate initial catalog? ,
|datadirectory|
mean when included in name? - integrated security -- assume "true" means "windows authentication" used vs "sql server authentication", that's guess.
- userid/password -- used in few odd examples. not clear when these might/might not needed.
- server -- see in rare examples -- how different data source?
- database -- ditto.
- multipleactiveresultsets -- ??
that's documented right here on msdn.
- datasource: name or network address of instance of sql server connect.
- intial catalog: name of database in scope when connecting.
- attachdbfilename: name of primary database file, including full path name of attachable database. attachdbfilename supported primary data files .mdf extension.
- integrated security: when false, user id , password specified in connection. when true, current windows account credentials used authentication.
- user id / pasword: used sql authentication.
- server: similar purpose datasource, appears support different syntaxs depending on needs.
- multipleactiveresultsets: when true, application can maintain multiple active result sets (mars). when false, application must process or cancel result sets 1 batch before can execute other batch on connection.
there lot more detail on each of these in documentation.
Comments
Post a Comment