Click to See Complete Forum and Search --> : Send data to SqlCommand


rosenth
August 20th, 2006, 11:50 AM
i have an textbox named 'Chapter' that its string must send az parameter
to a 'int' database field. :
sqlCommand->Parameters->Item[S"@Chapter"]->Value=Convert::ToInt32(chapter->Text)
.
an error displayed: "cannot convert from int to __gc* type.
how must i save int type to sql server database

Naumaan
August 21st, 2006, 02:16 AM
sqlCommand->Parameters->Item[S"@Chapter"]->Value=__box(Convert::ToInt32(chapter->Text));