将SQL Server 2008连接到Microsoft Visual Basic 2010 [英] Connecting SQL Server 2008 to Microsoft Visual Basic 2010

查看:95
本文介绍了将SQL Server 2008连接到Microsoft Visual Basic 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!

我想征询有关将SQL Server 2008数据库连接到Visual Basic 2010中开发的项目所需的语法的建议.这将是我第一次使用上述应用程序来开发本论文的注册系统.因此,我对如何连接数据库和项目一无所知.

除了将两者连接所需的代码之外,如果有人可以在添加,保存和删除Visual Basic 2010中的SQL Server 2008数据库中的记录时为我提供语法,这也将提供很大的帮助. >

谢谢.

Good day!

I would like to ask for advice regarding the syntax needed to connect a SQL server 2008 database to a project developed in visual basic 2010. It would be the first time I would use the aforementioned applications in order to develop an enrollment system for our thesis. As such, I am at a lost as to how I''ll be able to connect my database and project.

Aside from the codes needed to connect the two, it would also be a great help if someone can provide me with the syntax when it comes to adding, saving, and deleting records in an SQL Server 2008 database in Visual Basic 2010.


Thanks.

推荐答案

您需要创建一个
You need to create an SqlConnection [^]object, and work with that. The link has a description, and some examples that cover general tasks such as those you need.

You can get your connection string by looking at the Server Explorer pane in VS - highlight your database and look in the Properties pane. You can copy the connection string from there.


这篇关于将SQL Server 2008连接到Microsoft Visual Basic 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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