Hola buenos dias:
Estoy utilizando el appblock de microsoft.para .NET ,
al momento de enviar estos parametros a un store procedures por medio de un arreglo, me sale un error cuando mando un booleano, que es el siguiente:
public void CreateSource(string Name, string Description, string Url, int Status, string Format, string Type)
{
SqlParameter[] Params = new SqlParameter[6];
Params[0] = new SqlParameter("@SourceName",SqlDbType.NVarChar,50);
Params[0].Value = Name;
Params[1] = new SqlParameter("@SourceDescription",SqlDbType.NVarCh ar,50); Params[1].Value = Description;
Params[2] = new SqlParameter("@SourceURL",SqlDbType.NVarChar,50);
Params[2].Value = Url;
Params[3] = new SqlParameter("@SourceType",SqlDbType.NVarChar,50);
Params[3].Value = Type;
Params[4] = new SqlParameter("@SourceStatus",SqlDbType.Int,4); // AQUI ES EL ERROR !! ESTE ESE L PARAMETRO QUE SE MANDA UN VALOR BOOLENAO ..
Params[4].Value = true;
Params[5] = new SqlParameter("@SourceFormat",SqlDbType.NVarChar,50 );
Params[5].Value = Format;
y este es el error que me muestra..:
String was not recognized as a valid Boolean.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: String was not recognized as a valid Boolean.
alguien sabe como mandarle el parametro booleano al store procedure????
muchas gracias..