另一边的commandtype没有填充

时间:2014-01-08 07:28:45

标签: c# sql-server sql-server-2008 stored-procedures sqlcommand

我有以下sql代码在dot net中执行sp,我使用visual studio 2012,

using System.Data.SqlClient;
using System.Data.Sql;
using System.Data.SqlTypes;

SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "sp_TocheckExistingRecord";
cmd.CommandType = CommandType.StoredProcedure;

但每当我在右侧编写CommandType时它会显示错误命令类型在当前上下文中不存在..但是它在intellisense ..plz中的左侧填充帮助我......为什么会出现此错误

0 个答案:

没有答案