Connect Visual C # 2008 Express to SQL Server 2008 Express

I have a problem with Visual C # 2008 express (SP1) connecting to SQL Server 2008 express. The Add Connection window (wherever initiated) does not display the existing SQL server and does not matter for the SQL server, except for the compact version.

Please note that I have VWD 2008 express (SP1) on the same computer that displays the window regularly (with the specified SQL server), and SQL Server Management studio works fine with the server.

I saw other similar messages, did some tips: reinstalled VC #, started the service normally, etc., but so far it has not been possible with VC #.

Again, on the same machine, VWD regularly displays a dialog with SQL Server, but VC # shows only 3 options in the Change Data Source dialog box (1. Microsoft Access database file (OLE DB) 2. Microsoft SQL Server Compact 3.5, 3. Microsoft SQL Server Database File)

Any idea?

+3
source share
4 answers

I'm with Phil on this Visual Web Developer 2008 Express Tools> Database Connection ... opens the Add Connection dialog box with Server Name:

Visual C # 2008 Express has the database file name (new or existing):

It rather implies using ado.net programmatically

SqlConnection db = new SqlConnection(); db.ConnectionString =...

" =.\SQLEXPRESS; = MyDatabase; Integrated Security = True; ProviderName = System.Data.SqlClient ";

[ = \SQLEXPRESS] , ASPNETDB.MDF,

C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\master.mdf

MVS.NET 2003 Microsoft SQL Server 2000 Desktop Engine ontop SQL Server 2000. Microsoft Access SQL Server ODBC " " Access Basic.

+2

SQL 2005 SQL 2008 Express Edition .

".\SQLEXPRESS" .
"." "localhost", "SQLEXPRESS" - SQL Express.

Services:

  • → → services.msc
  • SQL Server
  • . : "SQL Server (SQLEXPRESS)"
+1

3 - Microsoft SQL Server, , .mdf , .

0

Source: https://habr.com/ru/post/1708888/


All Articles