Connecting to sqlexpress from visual c#

Tech-Archive recommends: Speed Up your PC by fixing your registry



I am almost getting frustrated please help me.
I need to establish a connection to the sqlexpress on my system from my
visual c#. I am programming a smart device using visual studio 2005.
I did the following
I enabled remote connections from the surface area config for tcp and
named pipes
I started the browser
I could connect from MS visual studio
The server is up and running

but when i tried to connect from visual studio using the code

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using System.Data;

namespace mQAQI
{
class sqlDatabaseUtil
{
SqlConnection dataConnection = new SqlConnection();


public void getConnection()
{

try

{
String connString = "Data
Source=abudawe\\sqlexpress;Initial Catalog=mQAQI;Integrated
Security=True";
//String connString = "Data Source=xx.sdf";
dataConnection.ConnectionString = connString;

dataConnection.Open();
MessageBox.Show("Connected to database successfully.");

}
catch (FileNotFoundException fe)
{
MessageBox.Show(fe.StackTrace + "Error Accessing the
database.");
MessageBox.Show(fe.Message);
}

catch (SqlException sqle)
{
MessageBox.Show(sqle.StackTrace + "Error Accessing the
database.");
MessageBox.Show(sqle.Message);
}
catch (IOException io)
{
MessageBox.Show(io.StackTrace + "Error Accessing the
database.");
MessageBox.Show(io.Message);
}


/* catch (Exception e)
{
MessageBox.Show(e.StackTrace + "Error Accessing the
database.");
Console.WriteLine(e.StackTrace);
}*/
finally
{
dataConnection.Close();
}

}
}

}



I get the following message
"specified server not found: abudawe\sqlexpress"

Please what am i doing wrong. I have battled with this issue for the
past 4 days

Thanks



*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages

  • "specified server not found: abudawesqlexpress"
    ... I need to establish a connection to the sqlexpress on my system from my ... I am programming a smart device using visual studio 2005. ... String connString = "Data ... "specified server not found: abudawe\sqlexpress" ...
    (microsoft.public.sqlserver.setup)
  • Re: Studio 2005 mit CF2.0 wince 5.0 Gerät verbinden HOWTO?
    ... Somehow the ActiveSync connection does not work for me. ... Visual Studio 2005 does not automatically ... setting security and establishing the ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Cannot establish connection...
    ... "Error: Cannot establish a connection. ... Download this utility and install - ... On the computer that is running Visual Studio .NET, ... If deployment ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Cant Connect Visual Studio to PPC
    ... I downloaded the Windows CE Utilities for Visual Studio .NET 2003 Add-on ... It says and I quote ... I get a device connection error when deploying or debugging, ...
    (microsoft.public.pocketpc.developer)
  • Re: Deploy error during debugging
    ... Once you have the connection you should be able to use the visual studio remote tools. ... With the platform builder I made a sdk and installed it. ...
    (microsoft.public.windowsce.platbuilder)