Click here to Skip to main content
12,349,379 members (67,305 online)
   

C#

 
Questionis Windows-8 can run Webservice that work with FrameWork3.5? Pin
goldsoft11-Nov-12 9:08
membergoldsoft11-Nov-12 9:08 
AnswerRe: is Windows-8 can run Webservice that work with FrameWork3.5? Pin
Eddy Vluggen11-Nov-12 11:17
memberEddy Vluggen11-Nov-12 11:17 
Questionselection of similar words in textbox c# Pin
MOR8911-Nov-12 6:26
memberMOR8911-Nov-12 6:26 
AnswerRe: selection of similar words in textbox c# Pin
Dave Kreskowiak11-Nov-12 7:09
mvpDave Kreskowiak11-Nov-12 7:09 
GeneralRe: selection of similar words in textbox c# Pin
MOR8912-Nov-12 4:39
memberMOR8912-Nov-12 4:39 
GeneralRe: selection of similar words in textbox c# Pin
Dave Kreskowiak12-Nov-12 4:50
mvpDave Kreskowiak12-Nov-12 4:50 
QuestionXML Serialization with large objects Pin
Kishore Hyd10-Nov-12 12:31
memberKishore Hyd10-Nov-12 12:31 
AnswerRe: XML Serialization with large objects Pin
Eddy Vluggen10-Nov-12 23:35
memberEddy Vluggen10-Nov-12 23:35 
QuestionInheritance of an Abstract Class Pin
ASPnoob10-Nov-12 10:45
memberASPnoob10-Nov-12 10:45 
AnswerRe: Inheritance of an Abstract Class Pin
Mycroft Holmes10-Nov-12 13:21
memberMycroft Holmes10-Nov-12 13:21 
AnswerRe: Inheritance of an Abstract Class Pin
Alan N10-Nov-12 13:27
memberAlan N10-Nov-12 13:27 
GeneralRe: Inheritance of an Abstract Class Pin
ASPnoob10-Nov-12 14:24
memberASPnoob10-Nov-12 14:24 
AnswerRe: Inheritance of an Abstract Class Pin
Richard Deeming12-Nov-12 2:09
memberRichard Deeming12-Nov-12 2:09 
QuestionC# issue: connection string to app.config file Pin
rachel_m10-Nov-12 8:05
memberrachel_m10-Nov-12 8:05 
In a C# 2008 application, I used linq to sql to connect to a sql server 2008 database. Now I want to obtain the connection of the database from the
app.config file instead of hardcoding the value into the application. I want to be able to change the connection string to the database since I will be moving this application from unit testing database to user acceptance database to the the prodction database.

Right now I am getting the error message, ""Object reference not set to an instance of an object." I know this error message is coming from the line of code that I listed below since it is the only line of code I changed.

The following is a snippet of the code from the *.designer.cs file (this is part of the dbml file).
using System.Configuration;
 
public esampleDataContext() : 
 base(ConfigurationManager.ConnectionStrings["sample.Properties.Settings.DEVConnectionString"].ConnectionString,mappingSource)
 
**Note:  base(global::sample.Properties.Settings.Default.DEVConnectionString, mappingSource) is the line of code that I replaced that was generated by the
         .net framework
I want to mention the following:
1. The *.dbml file is associated with a particular project file.
2. The connection string settings for this *.dbml file are the following:
a. DEVConnectionString (settings)
b. Connection String = Data Source=dev1;Initial Catalog=DEV_test;Integrated Security=True
c. application settings=True
d. settings property name is DEVConnectionString.
3. The project file that has the *.dbml file. has a reference set to the system.configuration.

**Note: This code in similar applications that I wrote, but I do not why it does not work here.

Thus can you tell me, show me in code, and/or point me to a reference that I can use so I can obtain the value in the app.config file for the database connection string I want to use. I do not want to use a hard-coded connection string to the database.
AnswerRe: C# issue: connection string to app.config file Pin
Eddy Vluggen10-Nov-12 23:38
memberEddy Vluggen10-Nov-12 23:38 
GeneralRe: C# issue: connection string to app.config file Pin
rachel_m11-Nov-12 6:11
memberrachel_m11-Nov-12 6:11 
AnswerRe: C# issue: connection string to app.config file Pin
jschell11-Nov-12 10:39
memberjschell11-Nov-12 10:39 
QuestionSSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Tridip Bhattacharjee10-Nov-12 7:49
memberTridip Bhattacharjee10-Nov-12 7:49 
AnswerRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Mycroft Holmes10-Nov-12 13:17
memberMycroft Holmes10-Nov-12 13:17 
GeneralRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Tridip Bhattacharjee11-Nov-12 6:57
memberTridip Bhattacharjee11-Nov-12 6:57 
GeneralRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Mycroft Holmes11-Nov-12 11:39
memberMycroft Holmes11-Nov-12 11:39 
GeneralRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Tridip Bhattacharjee11-Nov-12 19:35
memberTridip Bhattacharjee11-Nov-12 19:35 
GeneralRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Mycroft Holmes11-Nov-12 21:29
memberMycroft Holmes11-Nov-12 21:29 
GeneralRe: SSRS: How to deploy RDLC files with visual-studio 2010 setup Pin
Tridip Bhattacharjee13-Nov-12 19:53
memberTridip Bhattacharjee13-Nov-12 19:53 
QuestionExport data from report to excel in the wrong format Pin
Nguyễn Duy Nhân9-Nov-12 19:29
memberNguyễn Duy Nhân9-Nov-12 19:29 
GeneralRe: Export data from report to excel in the wrong format Pin
Eddy Vluggen10-Nov-12 7:22
memberEddy Vluggen10-Nov-12 7:22 
AnswerRe: Export data from report to excel in the wrong format Pin
Mycroft Holmes10-Nov-12 13:11
memberMycroft Holmes10-Nov-12 13:11 
QuestionExplorerBand,Explorer extending,I want to add a bar to the WindowsExplorer(not IE). Pin
ohsorry9-Nov-12 16:05
memberohsorry9-Nov-12 16:05 
QuestionDirect Sound Pin
Michael Kurdík9-Nov-12 7:41
memberMichael Kurdík9-Nov-12 7:41 
AnswerRe: Direct Sound Pin
Mycroft Holmes10-Nov-12 13:05
memberMycroft Holmes10-Nov-12 13:05 
AnswerRe: Direct Sound Pin
Michael Kurdík17-Nov-12 0:53
memberMichael Kurdík17-Nov-12 0:53 
QuestionVS2012 new WinForms project Pin
John Simmons / outlaw programmer9-Nov-12 2:00
mvpJohn Simmons / outlaw programmer9-Nov-12 2:00 
AnswerRe: VS2012 new WinForms project Pin
Manfred R. Bihy9-Nov-12 3:29
mvpManfred R. Bihy9-Nov-12 3:29 
QuestionNeed project suggestion Pin
Shashank Srivastava1)8-Nov-12 19:14
memberShashank Srivastava1)8-Nov-12 19:14 
AnswerRe: Need project suggestion Pin
Andy_L_J8-Nov-12 19:30
memberAndy_L_J8-Nov-12 19:30 
GeneralRe: Need project suggestion Pin
J4amieC8-Nov-12 21:24
memberJ4amieC8-Nov-12 21:24 
GeneralRe: Need project suggestion Pin
Andy_L_J8-Nov-12 21:38
memberAndy_L_J8-Nov-12 21:38 
AnswerRe: Need project suggestion Pin
J4amieC8-Nov-12 21:23
memberJ4amieC8-Nov-12 21:23 
AnswerRe: Need project suggestion Pin
sirama20048-Nov-12 22:14
membersirama20048-Nov-12 22:14 
AnswerRe: Need project suggestion Pin
Pete O'Hanlon8-Nov-12 22:15
protectorPete O'Hanlon8-Nov-12 22:15 
AnswerRe: Need project suggestion Pin
gopal pradhan8-Nov-12 23:02
membergopal pradhan8-Nov-12 23:02 
AnswerRe: Need project suggestion Pin
gopal pradhan8-Nov-12 23:07
membergopal pradhan8-Nov-12 23:07 
GeneralRe: Need project suggestion Pin
Richard MacCutchan8-Nov-12 23:33
mvpRichard MacCutchan8-Nov-12 23:33 
GeneralRe: Need project suggestion Pin
gopal pradhan8-Nov-12 23:36
membergopal pradhan8-Nov-12 23:36 
GeneralRe: Need project suggestion Pin
Richard MacCutchan9-Nov-12 0:52
mvpRichard MacCutchan9-Nov-12 0:52 
AnswerRe: Need project suggestion Pin
Rahul Rajat Singh9-Nov-12 0:54
memberRahul Rajat Singh9-Nov-12 0:54 
QuestionRemote desktop in web application Pin
Chethan T R8-Nov-12 18:49
memberChethan T R8-Nov-12 18:49 
AnswerRe: Remote desktop in web application Pin
sirama20048-Nov-12 19:00
membersirama20048-Nov-12 19:00 
QuestionBad design? Pin
Daniel Sheets8-Nov-12 8:01
memberDaniel Sheets8-Nov-12 8:01 
AnswerRe: Bad design? Pin
Eddy Vluggen8-Nov-12 8:38
memberEddy Vluggen8-Nov-12 8:38 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 24 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid