As Pete says, the database location is probably relevant here - you should never store data in the app folder as it tends to work in development, but fail in production. The reason for that is that in production it's installed under "Program Files" (or its x86 equivelant) which is protected from changes by the system to help prevent virus activity. Have a look here: Where should I store my data?[^] - it shows some better places, and how to access them. In addition, it's a poor idea to just us an anonymous INSERT - you should list the columns in the order you are going to INSERT them as this means your code is more resilient to changes in your DB. Use:
INSERT INTO ENVIO (Raid, Nparte, Cantidad, Ventana, Lider, Fecha) VALUES (@RAID, @NPARTE, @CANTIDAD, @VENTANA, @LIDER, @FECHA)
(Or similar) instead.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...