L
lakshmi
I'm trying to set the CommandType property of a SqlCommand
to Stored procedure. My code looks like:
using System.Data.SqlClient;
SqlCommand cmd = new SqlCommand("MyStoredProcedureName");
cmd.Connection = myConn;
cmd.CommandType = CommandType.StoredProcedure;
I'm getting the following error:
The type or namespace name 'CommandType' could not be
found.
Should I hard code the enumerated number for CommandType?
or what namespace would support the above syntax?
Your help is appreciated.
Thanks.
to Stored procedure. My code looks like:
using System.Data.SqlClient;
SqlCommand cmd = new SqlCommand("MyStoredProcedureName");
cmd.Connection = myConn;
cmd.CommandType = CommandType.StoredProcedure;
I'm getting the following error:
The type or namespace name 'CommandType' could not be
found.
Should I hard code the enumerated number for CommandType?
or what namespace would support the above syntax?
Your help is appreciated.
Thanks.