在MVC-2 ASP.NET中使用SQL更新查询更新数据库(VS2008) [英] Update database using sql update query in mvc-2 asp.net (VS2008)

查看:96
本文介绍了在MVC-2 ASP.NET中使用SQL更新查询更新数据库(VS2008)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我两天前才开始学习MVC,并开始尝试一些基本的数据库操作,成功执行了插入和选择查询,但是我没有得到如何执行sql更新操作.我的意思是我必须使用更新表名设置columname =值"并更新数据库.我需要在不使用实体框架的情况下执行此操作,即我正在使用sql服务器创建表并使用sqlconnection对象和ado.net概念连接到该表.

谢谢

Hello everyone

I just started learning MVC two days back and started trying out some basic database operations, was successfull in performing insertion and selection queries, but i didnt get how to perform sql update operation. I mean i have to use "Update tablename set columname=value" and update the database. I need to do this without using Entity framework, i.e i am creating table using sql server and connecting to it using sqlconnection object and ado.net concept.

Thank you

推荐答案

是的,我已经解决了.我使用linq to sql的概念效果很好.感谢您的支持
Yes I got the solution. I use linq to sql concept it works greate. Thanks for ur support


这篇关于在MVC-2 ASP.NET中使用SQL更新查询更新数据库(VS2008)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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