Error with simple INSERT statement

By : rdelfin

I made an insert statement that runs inside a page. It gave me an error, so I went to the sql server and ran the statement as it should be and used it to compare with what I wrote in the page. The thing is, it it writen properly but it doesn't work. It can't seem to detect the database or the tables at all and tells me the table doesn't exist and neither do the colums. The statement looks like this:

INSERT [Remisiones].[dbo].[Places] (Name, Type) VALUES ("Planta 1", "Planta")

I have also tried using [dbo].[Places] and simply Places but it gives me an error at the place of the table saying it is an Invalid object name. What is it doing?

By : rdelfin

Don't use double quotes for string delimiters; use single quotes.

INSERT [Remisiones].[dbo].[Places] (Name, Type) VALUES ('Planta 1', 'Planta');

This video can help you solving your question :)
By: admin