I have a DB in Access wich has a yes/no fields, and I made a USP to add records from a
VB app. but the problem is that I can't get my code right to do this any ideas my code look like this.
'Initialize the Command object and set its properties
objCommand = New OleDbCommand("usp_test1", objConnection)
objCommand.CommandType = Data.CommandType.StoredProcedure
'Add the Parameters to the Parameters collection
objCommand.Parameters.Add("@IDCorreoSAL", _
OleDbType.Guid, 16).Value = Guid.NewGuid()
objCommand.Parameters.Add("@NumeroSalida", _
OleDbType.UnsignedTinyInt, 1).Value = _
CType(txtNumero.Text, Byte)
objCommand.Parameters.Add("@FechaSalida", _
OleDbType.Date).Value = _
CType(txtFechaSalida.Text, DateTime)
objCommand.Parameters.Add("@Destinatario", _
OleDbType.VarChar, 50).Value = txtDestinatario.Text
objCommand.Parameters.Add("@FchaGuardia", _
OleDbType.Date).Value = _
CType(txtFechaGuardia.Text, DateTime)
objCommand.Parameters.Add("@Asunto", OleDbType.LongVarChar, _
txtAsunto.Text.Length).Value = _
txtAsunto.Text
objCommand.Parameters.Add("@clasificacion", _
OleDbType.LongVarChar, txtClasificacion.Text.Length).Value = _
txtClasificacion.Text
MsgBox(chbEmail.Checked)
If chbEmail.Checked = True Then
objCommand.Parameters.Add("@email", OleDbType.Integer).Value = "-1"
Else
objCommand.Parameters.Add("@email", OleDbType.Integer).Value = "0"
End If
I bold what I is wrong
Thank you