i ve got two radiobuttons one labelled male and the other labelled female and a client is supposed to choose which gender they are and insert it into the other database along with other information. I want to know how I can insert the chosen value (male or female) into the database
Dim Conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\WBS2020\WBS2020\WBS2020\WBS2020\WBS2020_22-02-2012.accdb;persist security info = false")
Dim iSql As String = "Insert into CompanyDetails (code,description) VALUES ('" & txtCode.Text & "', '" & txtDescription.Text & "' )"
Dim query2 As String = "Select @@Identity"
Dim ID As Integer
Dim cmd As New OleDbCommand(iSql, Conn)
Conn.Open()
cmd.ExecuteScalar()
cmd.CommandText = query2
ID = cmd.ExecuteScalar()