在C#应用程序中使用SQL数据库 [英] Using a SQL Database in a C# app

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

问题描述

我正在寻找使用SQL数据库的C#Windows应用程序的链接,特别是如何从表单中查看/更新/删除信息.

I''m looking for some links to a C# windows app that uses an SQL database, specifically, how to view/update/delete info from the form.

I'm在Visual Studio 2008中构建C#应用程序,我想向其中添加数据库.我已经在数据库中创建了表和关系,现在我希望能够从应用程序中查看/添加/删除数据.我能够将数据库绑定到某些组合框,但是当用户从组合框选择一些数据时,我不知道如何更新它们.过去几天我一直在寻找一些教程,但是我一直在获取有关如何构建数据库的信息,这不是我所需要的.

I''m building a C# app in Visual Studio 2008 and I want to add a database to it. I already made the tables and relations in the database, and now I want to be able to view/add/delete data from the application. I was able to bind the database to some combo boxes, but I don''t know how to update them when a user selects some data from the combo box. I''ve been looking for some tutorials for the past few days but I keep getting info on how to build a database, which is not what I need.

我知道这很简单,但是我厌倦了无能为力地寻找它,并希望获得一些帮助.这是我项目的最后一部分,我不知道该怎么做,我想尽快完成它.

I know this is a simple thing, but I''m tired of searching fruitlessly for it and would like some help. This is the last part of my project that I don''t know how to do and I want to get it finished as soon as possible.

感谢您的帮助!

推荐答案

在CodeProject上有很多这样的示例,请使用上方菜单栏上的文章"选项卡.

There are many such examples here on CodeProject, use the Articles tab on the menu bar above.


我意识到当您刚入门时可能会感到沮丧,因为您甚至都不知道要寻找什么.您确实应该读一本书,但是由于您已经为此做了一些工作,所以我会给您扔骨头.以下是您要研究的一些链接和关键字:
I realize it can be frustrating when you are just starting out, because you don''t even know what to look for. You really should read a book, but since you''ve put some work into this already, I''ll throw you a bone. Here are some links and keywords you''ll want to look into:
  • How To Update a SQL Server Database by Using the SqlDataAdapter Object in Visual C# .NET
  • Mastering C# Database Programming
  • Windows Forms
    Asp.Net
    C#
    update SQL table
    SQL Server insert row
    SQL Server CE
    ADO.Net
    LINQ
    SqlConnection
    SqlCommand
    SqlParameter


我找到的答案来自于《 Pro C#2008和.NET 3.5 Platform,第四版",作者:安德鲁·特罗尔森(Andrew Troelsen).他有很多不错的C#示例,但是对于"Pro"书来说,它并没有太深.不过,这是C#书籍的不错入门.
The answer I found came from the book "Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition" by Andrew Troelsen. He has a lot of good C# examples, but for a "Pro" book it didn''t go too deep. Good intro to C# book though.


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

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