Click here to Skip to main content
15,914,323 members
Home / Discussions / C#
   

C#

 
AnswerRe: execution of a C # application Pin
Gaurav Dudeja India7-May-10 1:50
Gaurav Dudeja India7-May-10 1:50 
AnswerRe: execution of a C # application Pin
nagendrathecoder7-May-10 1:54
nagendrathecoder7-May-10 1:54 
GeneralRe: execution of a C # application Pin
toto_20107-May-10 3:43
toto_20107-May-10 3:43 
Questiondunno how to define the connectionstring ! Pin
mrkeivan7-May-10 1:33
mrkeivan7-May-10 1:33 
AnswerRe: dunno how to define the connectionstring ! Pin
OriginalGriff7-May-10 1:40
mveOriginalGriff7-May-10 1:40 
GeneralRe: dunno how to define the connectionstring ! Pin
mrkeivan7-May-10 3:25
mrkeivan7-May-10 3:25 
GeneralRe: dunno how to define the connectionstring ! Pin
OriginalGriff7-May-10 3:51
mveOriginalGriff7-May-10 3:51 
AnswerRe: dunno how to define the connectionstring ! Pin
PIEBALDconsult7-May-10 4:17
mvePIEBALDconsult7-May-10 4:17 
I prefer to have a system-wide, non-application-specific configuration file that lists the databases available to the system.
Such a file can be stored in the Application Data directory for the user or all users -- so all users can have the same settings, or each user can have his own.

And I don't store actual connection strings; I store the information required to cobble one up for the requested database engine.

Here's an older version:

<DATABASES>
    <CT         TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="CoconutTelegraph" />
    <DTER       TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="DTER" />
    <DDLTEST    TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="DDLTEST" />
    <FIREBIRD   TYPE="FIREBIRD"  SERVER="LOCALHOST" NAME="C:\Program Files\Firebird\examples\empbuild\employee.fdb" USERNAME="SYSDBA" PASSWORD="masterkey" />
    <MPG        TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="MPG" />
    <MR         TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="MusicLibrary" />
    <RUBBISH    TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="Rubbish" />
    <SA         TYPE="SQLSERVER" SERVER="LOCALHOST\SQLEXPRESS" NAME="VersionControl" />
    <WORDSEARCH TYPE="ACCESS"  NAME="C:\projects\wordsearch\bin\release\WordSearch.MDB" PASSWORD=":badger:" USERNAME="admin" USERPASSWORD="" />
</DATABASES>


And here's a version I'm working with this week:

<Databases>
    <Junk Provider="SqlServer" Parameters=".\SQLEXPRESS,Junk" />
</Databases>



This allows the application to be more database agnostic -- it doesn't need to know which database engine is in use.
GeneralRe: dunno how to define the connectionstring ! Pin
mrkeivan7-May-10 9:13
mrkeivan7-May-10 9:13 
Questionwhy the event exist [modified][Solved] Pin
yu-jian7-May-10 1:09
yu-jian7-May-10 1:09 
AnswerRe: why the event exist Pin
Pete O'Hanlon7-May-10 1:23
mvePete O'Hanlon7-May-10 1:23 
AnswerRe: why the event exist Pin
#realJSOP7-May-10 1:26
professional#realJSOP7-May-10 1:26 
AnswerRe: why the event exist Pin
PIEBALDconsult7-May-10 4:35
mvePIEBALDconsult7-May-10 4:35 
GeneralRe: why the event exist Pin
yu-jian7-May-10 4:51
yu-jian7-May-10 4:51 
Questionstring to html tag Pin
Aljaz1117-May-10 0:17
Aljaz1117-May-10 0:17 
AnswerRe: string to html tag Pin
Peace ON7-May-10 0:25
Peace ON7-May-10 0:25 
AnswerRe: string to html tag Pin
Pete O'Hanlon7-May-10 0:27
mvePete O'Hanlon7-May-10 0:27 
GeneralRe: string to html tag Pin
#realJSOP7-May-10 1:28
professional#realJSOP7-May-10 1:28 
GeneralRe: string to html tag Pin
Pete O'Hanlon7-May-10 2:37
mvePete O'Hanlon7-May-10 2:37 
AnswerRe: string to html tag Pin
karle7-May-10 9:51
karle7-May-10 9:51 
QuestionRegEx Pin
Paul Unsworth6-May-10 23:50
Paul Unsworth6-May-10 23:50 
AnswerRe: RegEx Pin
OriginalGriff6-May-10 23:54
mveOriginalGriff6-May-10 23:54 
GeneralRe: RegEx Pin
Paul Unsworth6-May-10 23:57
Paul Unsworth6-May-10 23:57 
GeneralRe: RegEx Pin
OriginalGriff7-May-10 0:12
mveOriginalGriff7-May-10 0:12 
AnswerRe: RegEx Pin
OriginalGriff6-May-10 23:57
mveOriginalGriff6-May-10 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.