HI

I am using Microsft Data Access building block

And i am getting following error

An unhandled exception of type 'System.InvalidCastException' occurred in eval.ex

"Additional information: Object must implement IConvertible.

my code look like thi

SqlParameter paramFName = new SqlParameter("@FNAME",SqlDbType.Char,25)
paramFName.Value = "A"

SqlParameter []parm = new SqlParameter[1] {paramFName };
SqlHelper.ExecuteNonQuery(this.connectionstring1, "AddPatient", parm)


thanks in advanc
-p

Re: "Additional information: Object must implement IConvertible." by Sahil

Sahil
Fri May 14 02:01:29 CDT 2004

Sounds like a data type issue .. make sure that the SqlDbType you are
specifying matches Exactly what is in the database.

- Sahil Malik
Independent Consultant
You can reach me thru my blog at -
http://www.dotnetjunkies.com/weblog/sahilmalik/



"pmi" <anonymous@discussions.microsoft.com> wrote in message
news:FE5C16DA-85E3-42A1-9C18-EE4C8AED4503@microsoft.com...
> HI,
>
> I am using Microsft Data Access building block.
>
> And i am getting following error.
>
> An unhandled exception of type 'System.InvalidCastException' occurred in
> eval.exe
>
> "Additional information: Object must implement IConvertible."
>
> my code look like this
>
> SqlParameter paramFName = new SqlParameter("@FNAME",SqlDbType.Char,25);
> paramFName.Value = "A";
>
> SqlParameter []parm = new SqlParameter[1] {paramFName };
> SqlHelper.ExecuteNonQuery(this.connectionstring1, "AddPatient", parm);
>
>
>
>
> thanks in advance
> -p