Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Inserting a radiobutton values in the data base

rizwan9599rizwan9599 Posts: 6Member
[b][red]This message was edited by rizwan9599 at 2007-1-3 7:32:9[/red][/b][hr]
hello!
i m using two radiobutton in the form i.e.for one button is used for male and another one is used for female can anyone give coding for the button to insert into database


Comments

  • DrMartenDrMarten Posts: 748Member
    [b][red]This message was edited by DrMarten at 2007-1-3 12:0:44[/red][/b][hr]
    : hello!
    : i m using two radiobutton in the form i.e.for one button is used for male and another one is used for female can anyone give coding for the button to insert into database

    _____________________________________________________________________

    Hi,

    Put the two radiobuttons in a groupbox, that way only one can be selected. :-)

    [code]

    If radiobutton1.checked = True Then

    sex="Male"

    Else

    sex="Female"

    EndIf

    [/code]

    Try the MSDN library first if you don't have it installed with your Visual Studio.>>
    http://msdn.microsoft.com/library/

    Put a dot after a control name and some things become obvious.


    Regards,

    Dr M.

    P.S. How about using the word "please" occasionally when asking for
    help with code?

  • DrMartenDrMarten Posts: 748Member

    : hello!
    : i m using two radiobutton in the form i.e.for one button is used for male and another one is used for female can anyone give coding for the button to insert into database
    :
    Hi,

    Change the DELETE command in this post to an INSERT.

    The post at>> http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=39&MsgID=351851&Setting=A9999F0001

    is an example.



    Regaards,

    Dr M.



Sign In or Register to comment.