Click here to Skip to main content
15,896,207 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 22:26
Sushant Duggal11-Feb-07 22:26 
AnswerRe: SQL Server does not exists or access denied Pin
Sylvester george11-Feb-07 22:42
Sylvester george11-Feb-07 22:42 
GeneralRe: SQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 22:56
Sushant Duggal11-Feb-07 22:56 
GeneralRe: SQL Server does not exists or access denied Pin
Sylvester george11-Feb-07 23:01
Sylvester george11-Feb-07 23:01 
GeneralRe: SQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 23:05
Sushant Duggal11-Feb-07 23:05 
GeneralRe: SQL Server does not exists or access denied Pin
Sylvester george11-Feb-07 23:09
Sylvester george11-Feb-07 23:09 
GeneralRe: SQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 23:50
Sushant Duggal11-Feb-07 23:50 
AnswerRe: SQL Server does not exists or access denied Pin
Aaron S.12-Feb-07 11:20
Aaron S.12-Feb-07 11:20 
Below is the correct syntax for both Web.config and Code Behind files.

Web.config:
-------------------------------------------------------------------<configuration>
<appsettings>


<add key="ConnectionString1" value="Server=ServerNameHere;User Id=UserNameHere;password=PasswordHere;database=DatabaseNameHere">



-------------------------------------------------------------------

Code Behind in your Application (C# example):
-------------------------------------------------------------------
using System.Data.SqlClient;
using System.Configuration;

namespace YourNameSpaceHere
{
public class YourWebPageNameHere : System.Web.UI.Page
{
public string strConnString1

private void Page_Load(object sender, System.EventArgs e)
{
strConnString1 = ConfigurationSettings.AppSettings["ConnectionString1"];
{
}
}
-------------------------------------------------------------------

NOTE:
Now you are able to reference this connection string throughout your code.

Let me know if this helps,

Aaron S.
Power Base Media
AnswerRe: SQL Server does not exists or access denied Pin
Michael P Butler11-Feb-07 22:43
Michael P Butler11-Feb-07 22:43 
GeneralRe: SQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 22:57
Sushant Duggal11-Feb-07 22:57 
GeneralRe: SQL Server does not exists or access denied Pin
Pete O'Hanlon12-Feb-07 3:01
mvePete O'Hanlon12-Feb-07 3:01 
QuestionExport data from SQL server 2005 Pin
Spaz8011-Feb-07 21:16
Spaz8011-Feb-07 21:16 
QuestionCalculating the Time length Pin
minkinin11-Feb-07 20:14
minkinin11-Feb-07 20:14 
AnswerRe: Calculating the Time length Pin
Blue_Boy11-Feb-07 22:05
Blue_Boy11-Feb-07 22:05 
GeneralRe: Calculating the Time length Pin
minkinin12-Feb-07 0:09
minkinin12-Feb-07 0:09 
GeneralRe: Calculating the Time length Pin
Blue_Boy12-Feb-07 0:23
Blue_Boy12-Feb-07 0:23 
AnswerRe: Calculating the Time length Pin
gauthee11-Feb-07 22:07
gauthee11-Feb-07 22:07 
Questionless than 100 query Pin
m.rastgar11-Feb-07 19:18
m.rastgar11-Feb-07 19:18 
AnswerRe: less than 100 query Pin
Bassam Saoud11-Feb-07 19:59
Bassam Saoud11-Feb-07 19:59 
QuestionProgram can't access the server on the network &gt;&gt; VB.net 2005 [modified] Pin
kindman_nb11-Feb-07 10:48
kindman_nb11-Feb-07 10:48 
AnswerRe: Program can't access the server on the network &gt;&gt; VB.net 2005 Pin
kindman_nb11-Feb-07 21:31
kindman_nb11-Feb-07 21:31 
QuestionRe: Program can't access the server on the network &gt;&gt; VB.net 2005 Pin
andyharman11-Feb-07 23:43
professionalandyharman11-Feb-07 23:43 
AnswerRe: Program can't access the server on the network &gt;&gt; VB.net 2005 Pin
kindman_nb11-Feb-07 23:50
kindman_nb11-Feb-07 23:50 
QuestionAdvanced string manipulation - MS Access Pin
alect11-Feb-07 8:52
alect11-Feb-07 8:52 
AnswerRe: Advanced string manipulation - MS Access Pin
andyharman11-Feb-07 23:37
professionalandyharman11-Feb-07 23:37 

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.