Database Application Development basics-solutions to common problems: the following content is continuously improved based on the actual situation.
No. 1: Getting link strings-easily solve the problem by using udl files
Create a udl file in Windows to obtain the connection string accurately. Udl (Universal Data Link) is a universal data connection file.
(Udl) file to save the connection string.
Shows the creation steps:
Step 1: Create a New connstr. udl file and double-click it to open it. Select the provider (depending on the application requirements, you can select different providers), as shown in:
Step 2: Click the connection tab and select the connection method, database name, and server name, as shown in:
Step 3: Use a text program to open the connstr. udl file and copy the connection string, as shown in:
No. 2: SQL Server 2008 database installation and connection error Solution
1. Download and install SQL Server 2008
To download the package, go to the official Microsoft website. This is relatively reliable:
: Http://www.microsoft.com/zh-cn/SQLServer/get-sql-server/try-it.aspx
The installation process is generally relatively simple. For details, refer to the blog [Microsoft SQL Server 2008 installation diagram (Windows 7) blog address: http://blog.csdn.net/cexu2008/article/details/5498526]
If not, you can also see the installation video on the network at http://www.tudou.com/programs/view/xx8xprosibg /.
2. Database Connection Error
Error 1: the new database cannot appear in the data connection candidate box.For example, you have created a dbselectcourse database, but cannot open it in the Visual Studio development environment, as shown in:
Error cause: the server instance name is WANGDINGQIAO-PC during installation, and the SQL server automatically adds the suffix sqlexpress to the server name WANGDINGQIAO-PC \ sqlexpress each time the server selection box appears.
Shows the real running server name:
Work und: Be sure to select the correct server name when connecting to the database, change the server name to WANGDINGQIAO-PC, and successfully connect to the database, as shown in:
Error symptom 2: Windows authentication, SQL Server authentication, and permission error.
This part involves assigning new login users and user permissions. For details, refer to the following blogs:
1) create a user login in SQL Server 2008 and specify the user's database
2) Visual Studio 2010 and SQL Server 2008 Management Configuration tutorial
3) For details about database permissions, see [server level permissions for SQL Server 2005 and SQL Server 2008]. Address:
Http://www.mssqltips.com/sqlservertip/1714/server-level-permissions-for-sql-server-2005-and-sql-server-2008/