简单的一个注册
一个button
一个GroupBox
groupbox上放两个radiobutton 
分别代表男、女怎么才能将性别数据插入到数据库中?在线等  

解决方案 »

  1.   

    var
      SexField : String;
    begin
      if radiobutton1.checked then 
        SexField := '男';
      if radiobutton2.checked then 
        SexField := '女';
    end;
      

  2.   

    这样就可以么?
    貌似不可以啊
    我说的是怎么插入到数据库中就是按button 就可以把选中的那个rediobutton的值插入到数据库的表中继续期待。。
      

  3.   

    这样就可以么? 
    貌似不可以啊 
    我说的是怎么插入到数据库中 就是按button 就可以把选中的那个rediobutton的值插入到数据库的表中 继续期待。。
      

  4.   

    这样就可以么? 
    貌似不可以啊 
    我说的是怎么插入到数据库中 就是按button 就可以把选中的那个rediobutton的值插入到数据库的表中 继续期待。。
      

  5.   


    var
      SexField : String;
    begin
      if radiobutton1.checked then 
        SexField := '男';
      if radiobutton2.checked then 
        SexField := '女';
      adoquery1.close;
      adoquery1.sql.text:='insert into Table(sex)values('''+SexField +''')';
      adoquery1.ExecSQL;
    end;