VS.NET can use languages such as C # and VB.NET to develop .NET architectures, can also be used to write CSS (laminated style sheets), HTML, XML, and SQL. Among them, the functionality of SQL is often neglected by us. Here I explain in detail how vs.net works with SQL. ???? ???? Database connection ???? VS.NET Server Explorer can be very convenient to implement the connection with the database server. Although this connection is not limited to SQL Server. Figure A shows the Server Explorer panel on the right side of the VS.NET workspace. You can find the object via the View drop-down menu, or click the tab to display the Server Explorer on the right side of the workspace. Right-click Data Connections in Server Explorer, which will appear options to connect to the new database. Figure B is a connection dialog. Where the Test Connection button can easily test the connectionability and connection correctness of the database. ???? ???????? ???? Figure A: Visual Studio .NET Server Explorer ???? ???? ???? ???? Figure B: Add a Server Explorer New database connection ???? Once a connection is added in Server Explorer, it will appear in server nodes of Server Explorer. At the same time, the server name and related options will appear below. The SQL Servers node can provide programs to access SQL Server's capabilities of data elements. Now, you can already start debugging SQL code, but some settings are required before this. ???? ???? SQL Server settings ???? SQL Server includes an extended stored procedure that can be used to control the access capabilities of the calling process. This stored procedure is called sp_sdidebug. The following T-SQL code can be used to allow a user to debug the stored procedure: ???? ???? Use master ???? Grant Execute ???? N sp_sdidebug ???? To username ???? ???? In addition, the user must have access to the database and stored procedures. Once you do a good job, the user can start the real debugging process. In fact, the debugging process is very simple, just right-click the stored procedure in VS.NET Server Explorer, and select Step Into Stored Procedure. Figure C is an example of a stored procedure commissioning using the Northwind database. In this example, the stored procedure returns the highest price products from the database. ???? ???? ????????????????????????????????????????????????????????. Figure D is the view of the stored procedure in debug mode. The corresponding option can be implemented by the debug drop-down menu or shortcut. The following is a few shortcuts related to debug: ???? ???? ???? f5: Continue ???? shift f5: Stop debugging ???? f11: Single step entry ???? f10 : Single step jump ???? shift f11: Single step jump out ???? ???? ???? ???? Figure D: The stored procedure in debug mode ???? In addition, it can be added Points and view points to monitor the debugging process. At the bottom of the VS.NET workspace, you can see the output result of the debugging process. Figure E shows the VS.NET workspace after debugging the stored procedure. From the graph, we can see debugging information: The return value of the stored procedure run is 0, which means that the run is successful.