CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    7

    Send data to SqlCommand

    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

  2. #2
    Join Date
    Dec 2002
    Location
    St.Louis MO, USA
    Posts
    672

    Re: Send data to SqlCommand

    Code:
    sqlCommand->Parameters->Item[S"@Chapter"]->Value=__box(Convert::ToInt32(chapter->Text));
    A Person who is polite is given goodness and a person who is away from Politeness is away from Goodness.

    NAUMAAN

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured