Advertisement

04.29.2008 at 08:01PM PDT, ID: 23364290
[x]
Attachment Details

C# and Visual Studio 2008 SqlConnectionString error

Asked by jamesdean666 in Visual Studio 2008, Microsoft Visual C#.Net

Tags: Microsoft, Visual Studio, 8.0, C#

This is the relevant code:            

   private void btnLoad_Click(object sender, EventArgs e)
        {

            PhoenixWrapper phxConnection = new PhoenixWrapper();

            string bctConnProps = PhoenixWrapper.GetConnectionString();

            SqlConnection cnn = new SqlConnection(bctConnProps);  - GETTING ERROR HERE!!!

            SqlCommand cmd = cnn.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "SELECT VIEW_NAME FROM ENDORSEMENT_VIEWS";

            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = cmd;

            DataSet ds = new DataSet();
            da.Fill(ds, "ENDORSEMENT_VIEWS");

            dgProducts.DataSource = ds;

            dgProducts.DataMember = "ENDORSEMENT_VIEWS";
           
        }
    }

When I click the button btnLoad, it is giving the following error:

Keyword not supported: driver

When I debug the code, I am getting the following:
 
Cnn = null
bctConnProps      "driver={SQL Server};server=HMWBPRDDB1;database=HMWDEV;uid=PHXADM;pwd=PHOENIXDI;dsn=Phoenix Desktop;"      string

Please help,

Thanks

JD
Start Free Trial
[+][-]04.29.2008 at 08:54PM PDT, ID: 21467981

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 10:04PM PDT, ID: 21468199

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 10:13PM PDT, ID: 21468237

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 10:21PM PDT, ID: 21468254

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 03:12AM PDT, ID: 21469286

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 05:01AM PDT, ID: 21469820

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 07:20AM PDT, ID: 21470896

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 07:27AM PDT, ID: 21470956

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 07:27AM PDT, ID: 21470960

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio 2008, Microsoft Visual C#.Net
Tags: Microsoft, Visual Studio, 8.0, C#
Sign Up Now!
Solution Provided By: dstanley9
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628