数据库管理C# [英] Database Management C#

查看:84
本文介绍了数据库管理C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我在此视频 www.youtube.com/watch?v=3w2JkLcp-UA& feature = related

我想添加单元格并在带有按钮的文本框中返回结果!

这可能吗?

求助!!

Thnx!

Hi!

I create a database table following this video www.youtube.com/watch?v=3w2JkLcp-UA&feature=related

I want to add the cells and return the result in a textbox with a button!

Is this possible?

Help plz!!

Thnx!

推荐答案

是的.有可能的.需要其他帮助吗?
Yes. It is possible. Need help with anything else?


数据库表的数据库没有可添加的单元".它们具有记录"或行",您可以添加或删除. 单元"的概念属于UI控件的领域.它可以是网格的对象,(数据)网格视图,(带有)列的列表视图(带有(或多或少是宽松地)列),这些列用于表示由于查询而获得的数据库表.



基本上,您需要使用ADO.NET.对于初学者,我强烈推荐此CodeProject文章:
为初学者使用ADO.NET [简单的ADO.NET数据库读取,插入,更新和删除使用C#. [ ^ ].

希望对您有所帮助.

—SA
Databases of database tables do not have "cells" you can add. They have "record" or "rows" which you can add or remove. The notion of "cell" belong to the domain of UI controls. It can be an object of a grid, a (data) grid view, a list view (with) columns which (more or less loosely) used to represent database tables obtained as a result of queries.



Basically, you need to use ADO.NET. For starters, I highly recommend this CodeProject article:
Using ADO.NET for beginners[^].

Another article on Insert/Update/Delete with ADO.NET:
Simple ADO.NET Database Read, Insert, Update and Delete using C#.[^].

I hope it will help you to get started.

—SA


问题中给出的视频链接在详细视图中显示了database 的每条记录.据您所知,您希望像excel spreadsheet一样显示数据库中的所有记录,并能够在单个单元格中编辑数据.如果是这种情况,则可以对Windows窗体使用DataGridView control
这里给出一个例子
http://www.dotnetperls.com/datagridview-tutorial [ http://www.youtube.com/watch?v=4VNE0OuLbgo [ http://www.youtube.com/watch?v=FYD3892SBQw [ http://msdn.microsoft.com/en-us/library/k39d6s23.aspx [ ^ ]
The video link given in your question shows each record of the database in a detail view. As I understand from your question you want to display all the records from database like in excel spreadsheet, and able to edit the data in individual cells. If this is the case then you can use DataGridView control for windows forms
An example is given here
http://www.dotnetperls.com/datagridview-tutorial[^]
http://www.youtube.com/watch?v=4VNE0OuLbgo[^]
http://www.youtube.com/watch?v=FYD3892SBQw[^]
Help regarding the DataGridView control can be found here
http://msdn.microsoft.com/en-us/library/k39d6s23.aspx[^]


这篇关于数据库管理C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆