简体   繁体   English

在SQL Server数据库中的表中显示数据

[英]Display data in table from SQL Server database

I want to manually create a table in asp.net to display data from a mssql database. 我想在asp.net中手动创建一个表,以显示来自mssql数据库的数据。 I have set up a connection like this: 我已经建立了这样的连接:

SqlConnection connection = new SqlConnection("server = servername; uid = username; pwd = password; database = database;");
 connection.Open();

So I need to know a simple way to use this connection to display data in a table. 因此,我需要知道一种使用此连接在表中显示数据的简单方法。 I then want to be able to edit the data in this database, as well as add new data. 然后,我希望能够编辑该数据库中的数据,以及添加新数据。

Here is a place you can start. 这是您可以开始的地方。 If you need specific help update the question with more details about what's going on. 如果您需要特定的帮助,请更新有关问题的更多详细信息。

http://msdn.microsoft.com/en-us/library/aa719634(v=vs.71).aspx http://msdn.microsoft.com/zh-CN/library/aa719634(v=vs.71).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM