Click here to Skip to main content
15,895,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 10:33
mvePete O'Hanlon2-May-10 10:33 
GeneralRe: Best way to access a database Pin
PIEBALDconsult2-May-10 10:53
mvePIEBALDconsult2-May-10 10:53 
GeneralRe: Best way to access a database Pin
Terence van Schalkwyk2-May-10 20:01
Terence van Schalkwyk2-May-10 20:01 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 20:38
mvePete O'Hanlon2-May-10 20:38 
GeneralRe: Best way to access a database Pin
Terence van Schalkwyk2-May-10 20:58
Terence van Schalkwyk2-May-10 20:58 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 21:21
mvePete O'Hanlon2-May-10 21:21 
QuestionRe: Best way to access a database [modified] Pin
Terence van Schalkwyk2-May-10 23:37
Terence van Schalkwyk2-May-10 23:37 
AnswerRe: Best way to access a database Pin
Pete O'Hanlon3-May-10 2:33
mvePete O'Hanlon3-May-10 2:33 
Terence van Schalkwyk wrote:
Its still not liking ConfigurationManager


You need to add a reference to System.Configuration. It's not included in your list of references - right click on your reference, select Add reference and choose it from the .NET tab.


Terence van Schalkwyk wrote:
_connectionString = ConfigurationManager.ConnectionStrings["connection_string_stored_in_config_file"]


Now that we know what you are going to call your connection string, change this line to:
_connectionString = ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
The connection string you add in here largely depends on the database type and connection details. There is a handy online resource that shows many different types of connection string - it's available here[^].

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



Questionimage protect Pin
hameduser2-May-10 4:40
hameduser2-May-10 4:40 
AnswerRe: image protect Pin
Dave Kreskowiak2-May-10 5:51
mveDave Kreskowiak2-May-10 5:51 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 14:14
protectorAspDotNetDev2-May-10 14:14 
GeneralRe: image protect Pin
loyal ginger2-May-10 14:32
loyal ginger2-May-10 14:32 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:15
protectorAspDotNetDev2-May-10 19:15 
GeneralRe: image protect Pin
loyal ginger3-May-10 17:38
loyal ginger3-May-10 17:38 
GeneralRe: image protect Pin
Dave Kreskowiak2-May-10 14:38
mveDave Kreskowiak2-May-10 14:38 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:20
protectorAspDotNetDev2-May-10 19:20 
GeneralRe: image protect Pin
Anthony Mushrow2-May-10 15:37
professionalAnthony Mushrow2-May-10 15:37 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:19
protectorAspDotNetDev2-May-10 19:19 
QuestionDropDownList inside GridView Pin
msomar1-May-10 21:57
msomar1-May-10 21:57 
AnswerRe: DropDownList inside GridView Pin
Abhinav S1-May-10 22:42
Abhinav S1-May-10 22:42 
GeneralRe: DropDownList inside GridView Pin
Abdul-Rhman Alsri2-May-10 10:10
Abdul-Rhman Alsri2-May-10 10:10 
Questionmethod parameters error Pin
Abdul-Rhman Alsri1-May-10 17:00
Abdul-Rhman Alsri1-May-10 17:00 
AnswerRe: method parameters error Pin
Abhinav S1-May-10 17:15
Abhinav S1-May-10 17:15 
GeneralRe: method parameters error Pin
Abdul-Rhman Alsri1-May-10 18:43
Abdul-Rhman Alsri1-May-10 18:43 
AnswerRe: method parameters error Pin
Abhinav S1-May-10 20:34
Abhinav S1-May-10 20:34 

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.