Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: controls are like vb6 while im using vs.net Pin
Dave Kreskowiak14-May-07 3:44
mveDave Kreskowiak14-May-07 3:44 
GeneralRe: controls are like vb6 while im using vs.net Pin
Hasan Jaffal14-May-07 23:12
Hasan Jaffal14-May-07 23:12 
GeneralRe: controls are like vb6 while im using vs.net Pin
Dave Kreskowiak15-May-07 12:49
mveDave Kreskowiak15-May-07 12:49 
Questioncan not create activex component Pin
vmsrdy12-May-07 1:22
vmsrdy12-May-07 1:22 
AnswerRe: can not create activex component Pin
Dave Kreskowiak14-May-07 3:41
mveDave Kreskowiak14-May-07 3:41 
QuestionCreating user controls Pin
steve_rm12-May-07 0:49
steve_rm12-May-07 0:49 
AnswerRe: Creating user controls Pin
Christian Graus12-May-07 0:57
protectorChristian Graus12-May-07 0:57 
QuestionRadio Button insert option Pin
rrrriiizz12-May-07 0:43
rrrriiizz12-May-07 0:43 
hello all,

Am creating employees master data using vb.net and sql server. in my screen i have lot of radio button for male /female selection and some yes/no selection. my problem is how to insert this radiobutton values to the database.according to the user selection(yes/no). Here i have Attached My coding Please help me...........

INSERT OPTION CODE
Private Sub btnins_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnins.Click
       con.Open()
       str = "Insert into EmployeeMaster values('" & txtname.Text & "','" & txtfname.Text & "','" & dtdob.Text & "','" & gencom.Text & "','" & txtqual.Text & " ','" & txtbg.Text & " ','" & martcom.Text & "','" & txtadd.Text & "',' " & txtcadd.Text & " ','" & txtpho.Text & "','" & txtmob.Text & "',' " & txtemail.Text & " ','" & txtpp.Text & " ','" & txtpv.Text & " ',' " & txteno.Text & " ',' " & depcom.Text & " ', ' " & descom.Text & " ',' " & dtdoj.Text & " ','" & catcom.Text & "','" & mopcom.Text & "','" & txtac.Text & "','" & byes.Text & "',' " & txtbv.Text & "',' " & txtcdue.Text & "','" & txtcdate.Text & "','" & txtesino.Text & "','" & txtpfno.Text & "','" & expyes.Text & "',' " & detcom.Text & "','" & txtpc.Text & "','" & txtnc.Text & "' )"
       cmd = New OdbcCommand(str, con)
       cmd.ExecuteNonQuery()
       'check()
       MsgBox("Inserted")
       clear()
       con.Close()
   End Sub


VIEW OPTION CODE
con.Open()
        str = "select * from EmployeeMaster where Name='" & namecom.Text & "'"
        cmd = New OdbcCommand(str, con)
        dr = cmd.ExecuteReader
        If dr.Read Then
            txtname.Text = dr.GetValue(0)
            txtfname.Text = dr.GetValue(1)
            dtdob.Text = dr.GetValue(2)
            gencom.Text = dr.GetValue(3)
            txtqual.Text = dr.GetValue(4)
            txtbg.Text = dr.GetValue(5)
            martcom.Text = dr.GetValue(6)
            txtadd.Text = dr.GetValue(7)
            txtcadd.Text = dr.GetValue(8)
            txtpho.Text = dr.GetValue(9)
            txtmob.Text = dr.GetValue(10)
            txtemail.Text = dr.GetValue(11)
            txtpp.Text = dr.GetValue(12)
            txtpv.Text = dr.GetValue(13)
            enocom.Text = dr.GetValue(14)
            depcom.Text = dr.GetValue(15)
            descom.Text = dr.GetValue(16)
            dtdoj.Text = dr.GetValue(17)
            catcom.Text = dr.GetValue(18)
            mopcom.Text = dr.GetValue(19)
            txtac.Text = dr.GetValue(20)
            byes.Text = dr.GetValue(21)
            txtbv.Text = dr.GetValue(22)
            txtcdue.Text = dr.GetValue(23)
            txtcdate.Text = dr.GetValue(24)
            txtesino.Text = dr.GetValue(25)
            txtpfno.Text = dr.GetValue(26)
            expyes.Text = dr.GetValue(27)
            detcom.Text = dr.GetValue(28)
            txtpc.Text = dr.GetValue(29)
            txtnc.Text = dr.GetValue(30)
            dr.Close()
        End If
        con.Close()

AnswerRe: Radio Button insert option Pin
Christian Graus12-May-07 0:53
protectorChristian Graus12-May-07 0:53 
QuestionDataGridView Virtual Mode Sort Pin
_mubashir12-May-07 0:40
_mubashir12-May-07 0:40 
AnswerRe: DataGridView Virtual Mode Sort Pin
Dave Kreskowiak14-May-07 3:40
mveDave Kreskowiak14-May-07 3:40 
QuestionSQL statement problem [modified] Pin
Toubou11-May-07 23:34
Toubou11-May-07 23:34 
AnswerRe: SQL statement problem Pin
CPallini12-May-07 5:03
mveCPallini12-May-07 5:03 
Questionhelloooooooooooooooooo its urgent Pin
imanos11-May-07 22:50
imanos11-May-07 22:50 
AnswerRe: helloooooooooooooooooo its urgent Pin
theScorp11-May-07 23:10
theScorp11-May-07 23:10 
GeneralRe: helloooooooooooooooooo its urgent Pin
imanos13-May-07 22:39
imanos13-May-07 22:39 
AnswerRe: helloooooooooooooooooo its urgent Pin
Christian Graus12-May-07 0:13
protectorChristian Graus12-May-07 0:13 
JokeRe: helloooooooooooooooooo its urgent Pin
Paul Conrad12-May-07 14:31
professionalPaul Conrad12-May-07 14:31 
GeneralRe: helloooooooooooooooooo its urgent Pin
imanos13-May-07 22:50
imanos13-May-07 22:50 
GeneralRe: helloooooooooooooooooo its urgent Pin
Paul Conrad14-May-07 5:24
professionalPaul Conrad14-May-07 5:24 
Questionwhat is vb.net code for search the value in datagrid by select the value in combo box in vb.net windows application Pin
sathyan_829411-May-07 21:47
sathyan_829411-May-07 21:47 
AnswerRe: what is vb.net code for search the value in datagrid by select the value in combo box in vb.net windows application Pin
Christian Graus12-May-07 0:16
protectorChristian Graus12-May-07 0:16 
Questionwhat is vb.net code for delete a record in datagrid using vb.net windows application Pin
sathyan_829411-May-07 21:30
sathyan_829411-May-07 21:30 
AnswerRe: what is vb.net code for delete a record in datagrid using vb.net windows application Pin
harsh_c13-May-07 22:11
professionalharsh_c13-May-07 22:11 
Questionwhat is vb.net code for changing the values in datagrid and save the changed values in datagrid in vb.net windows application Pin
sathyan_829411-May-07 21:25
sathyan_829411-May-07 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.