Quisiera saber como tomar una foto en vb 2008 y guardarla en mysql ¿Alguien me ayuda?

dejo mi código de conexión por cualquiera coas

Try
If RadioButton1.Checked Then
RadioButton2.Checked = False
TextBox11.Text = "M"
End If
If RadioButton2.Checked Then
RadioButton1.Checked = False
TextBox11.Text = "F"
End If
Dim letra As Char 'generar id'
Dim i As Integer
Dim nom As String
i = 0
letra = TextBox2.Text(i)
While i < 3
nom += letra
i += 1
letra = TextBox2.Text(i)
End While
Dim letra1 As Char
Dim a As Integer
Dim ape As String
a = 0
letra1 = TextBox3.Text(a)
While a < 3
ape += letra1
a += 1
letra1 = TextBox3.Text(a)
End While
Dim cod As String 'variable para guardar los campos del id'
cod = nom + ape
TextBox1.Text = cod
Dim bd_agregar As New BaseDatos 'insertar registro'
bd_agregar.ejecutarInstruccionSQLDDL("INSERT INTO empleados2 VALUES ( '" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "', '" & TextBox11.Text & "' ,'" & DateTimePicker1.Value.Year & "-" & DateTimePicker1.Value.Month & "-" & DateTimePicker1.Value.Day & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox5.Text & "')")
bd_agregar.cerrarBD()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox11.Text = ""
TextBox10.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
MsgBox("La Clave de Uusario es: " & cod)
Catch ex As Exception
MsgBox("Ingregsa todos los datos que se te piden", MsgBoxStyle.Exclamation, "ERROR")
TextBox2.Enabled = False
TextBox3.Enabled = False
TextBox4.Enabled = False
TextBox5.Enabled = False
TextBox7.Enabled = False
TextBox8.Enabled = False
TextBox9.Enabled = False
RadioButton1.Enabled = False
RadioButton2.Enabled = False
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
Iniciar.Enabled = True
Iniciar.Focus()
agregar.Enabled = False
End Try

0

Añade tu respuesta

Haz clic para o