Click here to Skip to main content
15,902,198 members
Home / Discussions / Database
   

Database

 
AnswerRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 0:59
professionalCorporal Agarn31-Dec-09 0:59 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
willempipi31-Dec-09 1:30
willempipi31-Dec-09 1:30 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 2:27
professionalCorporal Agarn31-Dec-09 2:27 
AnswerRe: Using Stored Procedures as a field (SQL Server 2008) Pin
willempipi31-Dec-09 2:17
willempipi31-Dec-09 2:17 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 2:29
professionalCorporal Agarn31-Dec-09 2:29 
QuestionSQL Server Simultaneous Update with WHERE EXISTS Pin
c0der200930-Dec-09 22:14
c0der200930-Dec-09 22:14 
AnswerRe: SQL Server Simultaneous Update with WHERE EXISTS Pin
c0der200930-Dec-09 23:51
c0der200930-Dec-09 23:51 
QuestionConnection string loaded from config file Pin
Nigel Mackay30-Dec-09 18:44
Nigel Mackay30-Dec-09 18:44 
I have:
configMap =
   new ExeConfigurationFileMap { ExeConfigFilename = "ToolHistoryServer.exe.config" };
myCfg =
   ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
dataSource = myCfg.AppSettings.Settings["DataSource"].Value;
cnStr = "Data Source='" + dataSource + "';" +
        "Trusted_Connection=true;" +
        "Database=ToolHistory";

Config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <appSettings>
      <add key="DataSource" value="NIGEL-PC\\SQLEXPRESS" />
   </appSettings>
   <system.runtime.remoting>
    <application>
      <channels>
        <channel ref="tcp" port="50050" />
      </channels>
    </application>
  </system.runtime.remoting>
</configuration>

I have tried cnStr with and without the single quotes, but neither work. Something is wrong with my syntax.
It compiles and runs, but data access fails. Can't debug because it is on the server side.
AnswerRe: Connection string loaded from config file Pin
Eddy Vluggen31-Dec-09 4:59
professionalEddy Vluggen31-Dec-09 4:59 
GeneralRe: Connection string loaded from config file Pin
Nigel Mackay31-Dec-09 19:32
Nigel Mackay31-Dec-09 19:32 
QuestionSQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 1:41
professionalTinyDevices30-Dec-09 1:41 
AnswerRe: SQL Server 2005 Express edition Registration. Pin
Andy_L_J30-Dec-09 3:23
Andy_L_J30-Dec-09 3:23 
GeneralRe: SQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 19:32
professionalTinyDevices30-Dec-09 19:32 
AnswerRe: SQL Server 2005 Express edition Registration. Pin
Eddy Vluggen30-Dec-09 6:04
professionalEddy Vluggen30-Dec-09 6:04 
GeneralRe: SQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 19:34
professionalTinyDevices30-Dec-09 19:34 
QuestionRe: SQL Server 2005 Express edition Registration. Pin
Eddy Vluggen31-Dec-09 5:02
professionalEddy Vluggen31-Dec-09 5:02 
QuestionC# SQL express Login Pin
kadaen29-Dec-09 22:56
kadaen29-Dec-09 22:56 
AnswerRe: C# SQL express Login Pin
nagendrathecoder29-Dec-09 23:18
nagendrathecoder29-Dec-09 23:18 
GeneralRe: C# SQL express Login Pin
kadaen29-Dec-09 23:25
kadaen29-Dec-09 23:25 
GeneralRe: C# SQL express Login Pin
nagendrathecoder29-Dec-09 23:33
nagendrathecoder29-Dec-09 23:33 
GeneralRe: C# SQL express Login Pin
kadaen29-Dec-09 23:43
kadaen29-Dec-09 23:43 
GeneralRe: C# SQL express Login Pin
nagendrathecoder29-Dec-09 23:44
nagendrathecoder29-Dec-09 23:44 
GeneralRe: C# SQL express Login Pin
kadaen29-Dec-09 23:54
kadaen29-Dec-09 23:54 
GeneralRe: C# SQL express Login Pin
nagendrathecoder29-Dec-09 23:58
nagendrathecoder29-Dec-09 23:58 
GeneralRe: C# SQL express Login Pin
kadaen30-Dec-09 0:06
kadaen30-Dec-09 0:06 

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.