使用VB.net更新数据库中的数据的示例代码 [英] sample codes for Updating data in database using VB.net

查看:122
本文介绍了使用VB.net更新数据库中的数据的示例代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能给我一个更新数据库字段的示例代码
使用sql命令或VB.Net或VB 2008中的任何命令... ??

感谢d的帮助...我真的很需要它.. ,,

问候...:thumbsup:

can anyone give me a sample codes of Updating database fields
using sql commands or any in VB.Net or VB 2008...??

thanks for d help... i really need it badly..,,

regards...:thumbsup:

推荐答案

互联网上有很多这样的东西,应该问清楚才行.

以下是一些:
http://www.c-sharpcorner.com/UploadFile/sudhakarjalli/BasicDbOpsSpsJJ120012005442 /a> [ ^ ]
http://vsnetdatabinding.blogspot.com/ [ ^ ]

:)
There are lots of them over internet, should have searched before asking.

Here are a few :
http://www.c-sharpcorner.com/UploadFile/sudhakarjalli/BasicDbOpsSJ12012005005442AM/BasicDbOpsSJ.aspx[^]
http://vsnetdatabinding.blogspot.com/[^]

:)


感谢链接Sur.先生...

实际上我已经在搜索代码以进行更新,但是其中一些
他们无法正常工作...真的还不了解
功能..
但是感谢d的帮助..我会尝试一下是否有效...

上帝保佑!
Thanks for links Mr. Sur...

actually i already search codes for updating but some of
them are not working... and really don''t understand yet
the functions..
but thanks for d help.. i''ll try if this is working...

god bless!


首先,您需要根据您的栏目添加文本字段

现在编写插入命令

Dim strQuery as String =插入TableName值(textbox1.text,textbox2.text)"

定义一个SqlCommand

将dim cmd作为新的SqlCommand(strQuery,Connection)
cmd.executenonQuery

就这样
first u need to add text fields according to your Columns

now write the insert Command

Dim strQuery as String = "Insert into TableName Values(textbox1.text,textbox2.text)"

define a SqlCommand

dim cmd as new SqlCommand(strQuery,Connection)
cmd.executenonQuery

that''s all


这篇关于使用VB.net更新数据库中的数据的示例代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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