.Net
.Net
Imports MySql.Data.MySqlClient
End Sub
ComboBox2.DrawMode = DrawMode.Normal
End Sub
' Show the file dialog and check if the user selected a file
If ofd.ShowDialog() = DialogResult.OK Then
' Get the file path of the selected image and set it to the PictureBox
PictureBox1.ImageLocation = ofd.FileName
End If
End Sub
End Sub
End Sub
CheckConnection()
Dim msstream As New System.IO.MemoryStream()
PictureBox1.Image.Save(msstream, System.Drawing.Imaging.ImageFormat.Jpeg)
arrimage = msstream.ToArray()
msstream.Close()
conn.Open()
command.Parameters.AddWithValue("@photo", arrimage)
command.Parameters.AddWithValue("@name", txtPassword.Text)
command.Parameters.AddWithValue("@address", TextBox1.Text)
command.Parameters.AddWithValue("@contact_no", TextBox2.Text)
command.Parameters.AddWithValue("@adhar_no", TextBox3.Text)
command.Parameters.AddWithValue("@caste", ComboBox1.Text)
If RadioButton1.Checked Then
command.Parameters.AddWithValue("@caste_certificate", "Yes")
ElseIf RadioButton2.Checked Then
command.Parameters.AddWithValue("@caste_certificate", "No")
End If
If x > 0 Then
MessageBox.Show("Data Inserted")
Me.Hide()
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
Finally
conn.Close()
End Try
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Class
Output:
1.Login page
2.Home Page
3. Add student
4. Student List
5.Student Detail
6.Update
7. Delete