我的更新查询无效 [英] My update query is not working

查看:67
本文介绍了我的更新查询无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的更新查询不起作用



我尝试过:



My update query is not working

What I have tried:

Dim connectionw As New SqlConnection("Server=MAN;Database=sample;User ID=sa;Password=1234;Trusted_Connection=False")


connectionw.Open()
                    Dim command As New SqlCommand("update DB_Personal_Info set Age =  @Age  where brgy_No like @brgy_no", connectionw)
                    command.Parameters.Add("@Age", SqlDbType.Int).Value = agess
                    command.Parameters.Add("@brgy_no", SqlDbType.Int).Value = brgy_no_age
                    connectionw.Close()

推荐答案

您没有执行查询

在关闭连接之前尝试添加
You are not executing your query
Try adding
command.ExecuteNonQuery()


这篇关于我的更新查询无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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