R
Roy Gourgi
Hi,
I just install MSDE 2000 on my computer and I am trying to make a connection
with the server but it does not seem to be working. What am I doing wrong in
the code below? When I open my Server Explorer I see Data Connections and
Servers. Do I have to make a physical connection of some sort first? In the
Servers section, I see that it automatically created a SQL server by the
name REBORN where I created a database called royDB. Am I using the wrong
parameters below for the connections string:
string strConnection = "server=(local)\\REBORN;" +
"uid=QSUser;pwd=QSPassword;" +
"database=royDB";
Here is my code below.
TIA
Roy
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
namespace testing
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//Program Files\\Miscrosoft SQL Server\\MSSQL\\Data;" +
string strConnection = "server=(local)\\REBORN;" +
"uid=QSUser;pwd=QSPassword;" +
"database=royDB";
SqlConnection conn = new SqlConnection(strConnection);
conn.Open();
conn.Close();
}
}
}
I just install MSDE 2000 on my computer and I am trying to make a connection
with the server but it does not seem to be working. What am I doing wrong in
the code below? When I open my Server Explorer I see Data Connections and
Servers. Do I have to make a physical connection of some sort first? In the
Servers section, I see that it automatically created a SQL server by the
name REBORN where I created a database called royDB. Am I using the wrong
parameters below for the connections string:
string strConnection = "server=(local)\\REBORN;" +
"uid=QSUser;pwd=QSPassword;" +
"database=royDB";
Here is my code below.
TIA
Roy
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
namespace testing
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//Program Files\\Miscrosoft SQL Server\\MSSQL\\Data;" +
string strConnection = "server=(local)\\REBORN;" +
"uid=QSUser;pwd=QSPassword;" +
"database=royDB";
SqlConnection conn = new SqlConnection(strConnection);
conn.Open();
conn.Close();
}
}
}