ERROR EN LA SENTENCIA INSERT INTO
Publicado por motoko (3 intervenciones) el 09/05/2006 08:39:59
Hola estoy haciendo una base de datos en access 97. LLegados a un punto del código, le digo que ejecute una sentencia sql, para añadir datos en una tabla, pero me da error y no consigo saber pq. A ver si alguien puede echarme un cable. Siento el tochazo de sentencia que os voy a dejar colgado, es un royo. Pero es que es urgente, gracias a todos!.
SqlTablaDest = "INSERT INTO [DATOS DE LOS DESTINATARIOS](Cod_Destinatario, Tratamiento, Nombre, Apellido_1, Apellido_2, Direccion, CP, Poblacion, Isla, Telefono_1, Persona_de_contacto, Telefono_2 (Movil), Fax, E-Mail, Web, puesto_1, puesto_2, puesto_3, Observaciones) VALUES(" & CodDest & ", '" & StrTrat & "', '" & StrNombre & "', '" & StrApe1 & "', '" & StrApe2 & "', '" & StrDirec & "', " & StrCp & ", '" & StrPobl & "', '" & StrIsla & "', '" & StrTfno1 & "', ' " & StrPers & "', '" & StrTfno2 & "', '" & StrFax & "', '" & StrEmail & "', '" & StrWeb & "', '" & StrPuesto1 & "', '" & StrPuesto2 & "', '" & StrPuesto3 & "', '" & StrObserv & "');"
SqlTablaDest = "INSERT INTO [DATOS DE LOS DESTINATARIOS](Cod_Destinatario, Tratamiento, Nombre, Apellido_1, Apellido_2, Direccion, CP, Poblacion, Isla, Telefono_1, Persona_de_contacto, Telefono_2 (Movil), Fax, E-Mail, Web, puesto_1, puesto_2, puesto_3, Observaciones) VALUES(" & CodDest & ", '" & StrTrat & "', '" & StrNombre & "', '" & StrApe1 & "', '" & StrApe2 & "', '" & StrDirec & "', " & StrCp & ", '" & StrPobl & "', '" & StrIsla & "', '" & StrTfno1 & "', ' " & StrPers & "', '" & StrTfno2 & "', '" & StrFax & "', '" & StrEmail & "', '" & StrWeb & "', '" & StrPuesto1 & "', '" & StrPuesto2 & "', '" & StrPuesto3 & "', '" & StrObserv & "');"
Valora esta pregunta


0