帮助我创建一个简单的程序vb.net [英] help me to create a simple program vb.net

查看:68
本文介绍了帮助我创建一个简单的程序vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个简单的程序来从文本框中插入和删除数据(文本和数字)到sql server 2005,并且在Data Grid View中请帮助我"我只是这个方面的初学者. ....

i need a simple program to insert and delete data (text and a number) from text box to sql server 2005 and in Data Grid View plz help me ''m just a beginner in this..... plz help me....

推荐答案

由于这是您的家庭作业,因此您可以公平地完成工作:因此无需代码!
这不是一项艰巨的任务:您的笔记将覆盖大部分(如果不是全部).
就像其他任何问题一样,将其分解为可管理的块,然后一次处理一个,确保在继续进行之前确保每个块都能正常工作:

1)创建一个带有一个或两个文本和数字框的表单或页面.
2)确保在用户输入文字和数字后将其输入到程序中.
3)创建数据库.您将需要至少一个表,(可能)至少有三列.如果您的数字不是唯一的,一个用于您的文本,一个用于您的数字,可能还用于身份标识列.
4)从用户那里获取您的电话号码,并将其输出到数据库:
4a)创建与数据库的连接,然后打开它.
4b)创建一个命令对象,并为其提供刚打开的连接以及一个有效的SQL命令以插入数据.
4c)执行命令.
4d)处理命令
4e)处理连接.

完成.
Since this is your homework, it''s only fair you do the work: so no code!

It isn''t a difficult task: your notes will cover most if not all of it.
Just like any other problem, break it down into manageable chunks, and do them one at a time, making sure each chunk works properly before you move on:

1) Create a form or page with one or two boxes on it for the text and the number.
2) Make sure you can get the text and the number into your program once the user has entered them.
3) Create your database. You will need at least one table, with (probably) at least three columns. One for your text, one for you number, and possibly one more for an identity column, if your numbers aren''t going to be unique.
4) Get your numbers from the user, and output it to the database:
4a) Create a connection to the DB, and open it.
4b) Create a command object, and give it both the connection you just opened, and a valid SQL command to insert the data.
4c) Execute the command.
4d) Dispose of the command
4e) Dispose of the connection.

Done.


这篇关于帮助我创建一个简单的程序vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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