B
Bob K
I find that I sometimes need to get a localized string during the UI phase
of setup, in a Custom Action. For instance, if I need to fill a combo box
with some static text entries. There doesn't seem to be any easy way to
access the string table.
My solution is to write a routine that does the following:
1. Get the current language (MsiGetLanguage)
2. Open Database (MsiGetActiveDatabase)
3. Open a view and select the record (MsiDatabaseOpenView)
4. Execute the query (MsiViewExecute)
5. Get the record (MsiViewFetch)
Seems pretty straightforward, except I can't get past step 3. I am creating
a query that looks like this:
SELECT * FROM ISString WHERE (ISString.ISString='ID_STRING1') AND
(ISString.ISLanguage_='1033')
MsiDatabaseOpenView returns ERROR_BAD_QUERY_SYNTAX.
The string table is defined as:
<table name="ISString">
<col key="yes" def="s255">ISString</col>
<col key="yes" def="s50">ISLanguage_</col>
<col def="S0">Value</col>
<col def="I2">Encoded</col>
<col def="S0">Comment</col>
<col def="I4">TimeStamp</col>
Thanks for any ideas,
Bob
of setup, in a Custom Action. For instance, if I need to fill a combo box
with some static text entries. There doesn't seem to be any easy way to
access the string table.
My solution is to write a routine that does the following:
1. Get the current language (MsiGetLanguage)
2. Open Database (MsiGetActiveDatabase)
3. Open a view and select the record (MsiDatabaseOpenView)
4. Execute the query (MsiViewExecute)
5. Get the record (MsiViewFetch)
Seems pretty straightforward, except I can't get past step 3. I am creating
a query that looks like this:
SELECT * FROM ISString WHERE (ISString.ISString='ID_STRING1') AND
(ISString.ISLanguage_='1033')
MsiDatabaseOpenView returns ERROR_BAD_QUERY_SYNTAX.
The string table is defined as:
<table name="ISString">
<col key="yes" def="s255">ISString</col>
<col key="yes" def="s50">ISLanguage_</col>
<col def="S0">Value</col>
<col def="I2">Encoded</col>
<col def="S0">Comment</col>
<col def="I4">TimeStamp</col>
Thanks for any ideas,
Bob