MSI SQL Syntax

N

Norman Bullen

I'm trying to get the values from a couple of columns in the Component
table of an MSI database and I keep getting 1615
(ERROR_BAD_QUERY_SYNTAX) as the value returned by MsiDatabaseOpenView()
although, as far as I can tell, my SQL SELECT statement complies with
the syntax specified in MSDN at
http://msdn2.microsoft.com/en-us/library/aa372021.aspx and in my MySQL book.

I have tried a number of variations on
SELECT ComponentId , Directory FROM Component
including without spaces around the comma, and omitting the comma (even
though the syntax page says it's required.

I have tried putting grave accent marks (`) around the column and table
names.

None of these work.

The only way that I've managed to get a SELECT statement to work is when
I use an asterisk (*) to mean all columns. I don't want to do that
because the above page says I should select columns by name when
referencing fields by column position.

TIA for any suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top