关于数据库连接的vb.net问题 [英] vb.net question regarding db connection

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

问题描述

我现在在vb.net中创建了表单,我想与我的Sql服务器数据库连接.怎么做.以及将数据库连接代码粘贴到代码窗口中的确切位置.请帮助.

I have created my forms in vb.net now I want to connect with my Sql server Database. how to do it. and exactly where to paste the database connection code in code window. plz help.

推荐答案

1.您将需要了解一点ADO.NET
2.创建一个连接对象.
3.创建一个命令对象.
4.使用命令对象与Db对话.

我认为了解这一点将使他们花费更少的时间从某个地方粘贴一些借来的代码,然后花时间进行调试和故障排除.

但是,如果您仍然希望这样做,请显示一些代码片段以了解其功能,以便我可以告诉您正确的放置位置.
1. you will need to know a little bit of ADO.NET
2. Create a connection object.
3. create a command object.
4. use the command object to talk to the Db.

I think understanding this will take less time them pasting some borrowed code from somewhere and then spending time in debugging and troubleshooting.

But if you still want to do that show some code snippet to understand what it does so that I can tell you the right location to put that.


http://www.java-samples.com/showtutorial.php?tutorialid=1019 [
http://www.java-samples.com/showtutorial.php?tutorialid=1019[^]

Meenu just try to get it...! your solution is here..!
Regards
Dnyanesh


google可以为您提供此类基础知识,但事实是,如果您遇到困难,应首先搜索进行尝试,然后cp始终在这里寻求帮助.
很好地参考此链接,可能会帮助您:
http://support.microsoft.com/kb/308656 [
google can help you foe such basics, the thing is that you should try it by searching first if you are getting difficulties then cp is always here for assistance.
well refer this link , that might help you:
http://support.microsoft.com/kb/308656[^]


这篇关于关于数据库连接的vb.net问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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