本文介绍了必须声明标量变量“@ customer”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建Windows应用程序使用 c# 2010 ,这里我am 使用数据网格视图进行计费,但将网格视图值保存到数据 base 低于错误 来自
必须声明标量变量 @ customer。
SqlCommand cmd2 = new SqlCommand( update stkdetails set customer = customer + @ customer + rows.Cells [ 7 ]。Value + 其中empname =' + rows.Cells [ 2 ]。值+ 'and date =' + txtdate.Text + ',con2);
任何一位给我一些想法如何解决上述错误
什么我试过了:
必须声明标量变量@customer。
解决方案
I am creating windows application using c# 2010, here i am using data grid view for billing purpose, but save the grid view values to data base below error is came Must declare the scalar variable "@customer". SqlCommand cmd2 = new SqlCommand("update stkdetails set customer=customer+@customer" + rows.Cells[7].Value + " where empname='" + rows.Cells[2].Value + "'and date='" + txtdate.Text + "'", con2); any one give me some ideas how to solve above error
What I have tried:
Must declare the scalar variable "@customer".
解决方案
这篇关于必须声明标量变量“@ customer”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!