Sql statment: Is this correct?

"SELECT * FROM Order Details WHERE (OrderID) ='" + text + "'";

The thing is the Order Details. My lists name is that. Is it possible to have space in the word?
Who is Participating?
tillgeffkenConnect With a Mentor Commented:
Yes, it's not common (good) practice. Try changing your query to:

"SELECT * FROM [Order Details] WHERE OrderID ='" + text + "'";

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.