
15/10/2012, 16:14
|
| | Fecha de Ingreso: junio-2011
Mensajes: 329
Antigüedad: 13 años, 8 meses Puntos: 2 | |
Error VB.net & Acces Estoy trabajando con una base de datos de acces en un aplicacion VB.NET.. a la hora de querer insertar un registro me manda el siguiente error...
Format of the initialization string does not conform to specification starting at index 35.
este es mi codigo:
Dim gafete = TextBox1.Text
Dim telefono = TextBox2.Text
Dim clientemr = TextBox3.Text
Dim nombre = TextBox4.Text
Dim direccion = TextBox5.Text
Dim email = TextBox6.Text
Dim empresa = TextBox7.Text
Dim Valid = False
If gafete = Nothing Then
MsgBox("Please enter First Name")
Valid = False
Else
Valid = True
End If
'If LastName = Nothing Then
'MsgBox("Please enter Last Name")
'Valid = False
'Else
'Valid = True
'End If
If Valid = True Then
Dim Cmd As OleDbCommand
Dim SQL As String
Dim objCmd As New OleDbCommand
Dim Con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0 ; C:\Users\-\Documents\Visual Studio 2008\Projects\Expomecanico2012\Expomecanico2012\Ex po2012A.mdb")
SQL = "INSERT INTO Expo2012 (*) VALUES ('" & gafete & "', '" & telefono & "', '" & clientemr & "', '" & nombre & "', '" & direccion & "', '" & empresa & "', '" & email & "')"
Cmd = New OleDbCommand(SQL, Con)
Con.Open()
objCmd = New OleDbCommand(SQL, Con)
objCmd.ExecuteNonQuery()
Con.Close()
End If
End Sub
la maquina donde lo estoy corriendo tiene windows 7 y es de 64 bits.
alguien sabe que esta mal.? |