新的C#程序员问题 [英] New C# programmer questions

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

问题描述

所以我一直在努力研究C#编码,到目前为止,我正在做好

。我开始使用简单的控制台应用程序和

最终制作了一个小小的Windows应用程序,每周花费你的工资&

小时,可以计算你的每月,每周和每周每小时支付

有或没有税收。非常漂亮,但此时我想b / b
想要从我的下一个测试数据库中提取数据

项目。我试过在网上冲浪,我似乎无法找到任何更新的文档作为一个新的

程序员,如何添加从数据库访问/更改数据。

有些人愿意提供帮助的xtra信息如下,再次感谢

:)


开发:Visual Studio 2008

数据库:Microsoft Access数据库

数据库位置:C:\customer.mdb

密码保护的数据库=否

表名:信息

表主键:CID

表Field1:FirstName

程序字段:txtCustomerName


我希望能够连接,通过输入的名称提取客户,

以后可以更改该信息。我希望这有助于让我知道如果您需要更多信息,谢谢!

So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can''t seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database.
Some xtra information for those willing to help is below, thanks
again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName

I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!

推荐答案



CSharp-Jay写道:

"CSharp-Jay" wrote:

所以我一直在努力研究C#编码,到目前为止,我正在做很好的事情。我开始使用简单的控制台应用程序和

最终制作了一个小小的Windows应用程序,每周花费你的工资&

小时,可以计算你的每月,每周和每周每小时支付

有或没有税收。非常漂亮,但此时我想b / b
想要从我的下一个测试数据库中提取数据

项目。我试过在网上冲浪,我似乎无法找到任何更新的文档作为一个新的

程序员,如何添加从数据库访问/更改数据。

有些人愿意提供帮助的xtra信息如下,再次感谢

:)


开发:Visual Studio 2008

数据库:Microsoft Access数据库

数据库位置:C:\customer.mdb

密码保护的数据库=否

表名:信息

表主键:CID

表Field1:FirstName

程序字段:txtCustomerName


我希望能够连接,通过输入的名称提取客户,

以后可以更改该信息。我希望这有助于让我知道如果您需要更多信息,谢谢!
So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can''t seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database.
Some xtra information for those willing to help is below, thanks
again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName

I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!



你好Jay,

您需要的是直接使用OldDbCommand或包含在

OleDbDataAdapter中。为了能够使用OleDbCommand它需要一个OleDbConnection

和一个命令字符串,而OleDbConnection需要一个连接字符串

www.connectionstrings.com 可以帮助您创建这个。)


本教程可能会帮助您入门对ADO.Net的基本了解

http://www.csharp-station.com/Tutori.../Lesson01.aspx


本文演示使用OleDb读取Access数据库。 />
http://www.codeproject.com/ KB /数据库... sInCSharp.aspx


如果你发现关于OleDb类的信息很少,请尝试用谷歌搜索SqlCommand等

因为用法相同在大多数情况下。


-

Happ y Coding!

Morten Wennevik [C#MVP]

Hi Jay,

What you need is to use an OldDbCommand, either directly or wrapped in an
OleDbDataAdapter. To be able to use OleDbCommand it needs an OleDbConnection
and a command string, and the OleDbConnection needs a connection string
(www.connectionstrings.com may help you create this).

This tutorial may get you started with the basic understanding of ADO.Net

http://www.csharp-station.com/Tutori.../Lesson01.aspx

Whereas this article demonstrates using OleDb to read Access databases.

http://www.codeproject.com/KB/databa...sInCSharp.aspx

If you find little information on OleDb classes try googling SqlCommand etc
as the usage is identical in most cases.

--
Happy Coding!
Morten Wennevik [C# MVP]


您好,


我还建议你看看ORM概念以及LINQ

2 SQL和ADO .NET实体框架。


亲切的问候,

Andrei Varanovich [C#MVP]
Hello,

I would also recommend you to have a look at the ORM concept as well as LINQ
2 SQL and ADO .NET Entity Framework.

Kind regards,
Andrei Varanovich [C# MVP]

所以我一直在努力研究C#编码,我正在做

到目前为止相当不错。我开始使用简单的控制台应用程序和

最终制作了一个小小的Windows应用程序,每周花费你的工资&

小时,可以计算你的每月,每周和每周每小时支付

有或没有税收。非常漂亮,但此时我想b / b
想要从我的下一个测试数据库中提取数据

项目。我试过在网上冲浪,我似乎无法找到任何更新的文档作为一个新的

程序员,如何添加并从数据库访问/更改数据。一些

xtra信息对于那些愿意提供帮助的人来说,再次感谢:)


开发:Visual Studio 2008

数据库:Microsoft Access数据库

数据库位置:C:\customer.mdb

密码保护DB =否

表名:Info

表主键:CID

表Field1:FirstName

程序上的字段:txtCustomerName

我想能够连接,通过输入的名称提取客户,

以后可以更改该信息。我希望这有助于让我知道如果您需要更多信息,谢谢!
So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can''t seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database. Some
xtra information for those willing to help is below, thanks again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName
I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!



这篇关于新的C#程序员问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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