想在vb.net程序中使用数据库 [英] Want to use database in vb.net program

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

问题描述

嘿所有,



我正在尝试为自己创建一个游戏(并学习一点编程),我想学习如何使用用于从数据库获取信息的SQL查询。我将使用该信息设置自定义对象的变量。



我现在要做的就是:

- 创建数据库。

- 学习如何让我的程序从该数据库中获取信息。



我试过在网上搜索,但我真的不知道该搜索什么......



请指出正确的方向。



我正在使用Visual Basic 2010 Express。

我想我可以从w3schools学到很多关于SQL的知识。

我希望我的数据库包含变量对于1499个对象,每个对象有20-30个变量。 (我还需要弄清楚多少:P。)



非常感谢帮助!



编辑:

感谢您的回复,似乎我有很多阅读要做。

Hey all,

I''m trying to create a game for myself (and learn to program a bit), and I want to learn how to use SQL queries to get information from a database. I''ll use that information to set a custom object''s variables.

All I have to do now is:
- create the database.
- learn how to have my program get information from that database.

I''ve tried searching the web, but I don''t really know what to search for...

Please point me in the right direction.

I''m using Visual Basic 2010 Express.
I think I can learn enough about SQL from w3schools.
I want my database to contain the variables for 1499 objects, each object has 20-30 variables. (I still have to figure out how many :P .)

Help would be greatly appreciated!


Thanks for the responses, seems I''ve got a lot of reading to do.

推荐答案

简短回答是:使用ADO.NET:

http://en.wikipedia.org/wiki/ADO.NET [ ^ ],

http://msdn.microsoft.com/en-us/library/aa286484.aspx [ ^ ]。



我通常会推荐这篇简短的CodeProject文章,以便开始使用:为初学者使用ADO.NET [ ^ ]。



-SA
Short answer is: use ADO.NET:
http://en.wikipedia.org/wiki/ADO.NET[^],
http://msdn.microsoft.com/en-us/library/aa286484.aspx[^].

I usually recommend this short by very informative CodeProject article to get started: Using ADO.NET for beginners[^].

—SA


最佳位置是MSDN

http://msdn.microsoft.com/en-us/library/s4yys16a(v = vs.71).aspx [ ^ ]

http://www.dreamincode.net/forums/topic/32392-sql-basics-in- vbnet / [ ^ ]

http://www.developer.com/net/vb/article.php/3558771/Binding-Data-to-WinForms-Controls-in-VBNET-20.htm [< a href =http://www.developer.com/net/vb/article.php/3558771/Binding-Data-to- WinForms-Controls-in-VBNET-20.htmtarget =_ blanktitle =New Window> ^ ]

http://www.microsoft.com/en-us/download/details.aspx?id=4856 [ ^ ]





你最好还检查实体框架

绝对初学者实体框架简介 [ ^ ]

http://adoeftutorial.codeplex.com/ [ ^ ]

http:// m sdn.microsoft.com/en-us/library/bb399572.aspx [ ^ ]
Best place is MSDN
http://msdn.microsoft.com/en-us/library/s4yys16a(v=vs.71).aspx[^]
http://www.dreamincode.net/forums/topic/32392-sql-basics-in-vbnet/[^]
http://www.developer.com/net/vb/article.php/3558771/Binding-Data-to-WinForms-Controls-in-VBNET-20.htm[^]
http://www.microsoft.com/en-us/download/details.aspx?id=4856[^]


you better check Entity Framework also
An Introduction to Entity Framework for Absolute Beginners[^]
http://adoeftutorial.codeplex.com/[^]
http://msdn.microsoft.com/en-us/library/bb399572.aspx[^]


很长的路要走 -

你必须要了解数据库和数据的连接字符串在VB.net中检索和处理。

如果你从ADO.net开始它会更好,这里有一篇文章对于初学者 -



< a href =http://www.codeproject.com/Articles/8477/Using-ADO-NET-for-beginners>为初学者使用ADO.NET [ ^ ]



我认为上面的文章已经足够开始,休息时你可以稍后探索。



希望它有所帮助。
A long way to travel-
You have to learn about the connection string for database and Data retrieval and processing in VB.net .
Its better if you start with ADO.net, here is an article For beginners-

Using ADO.NET for beginners[^]

I think the above article is enough for beginning, rest you can explore later.

Hope it helps.


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

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