If you literally have "SELECT 'Control' , `Text` , `Property` FROM `Control`" then you will always get "Control" as your first column's value (since you asked for a literal instead of a column value). Try "SELECT `Control` , `Text` , `Property` FROM `Control`" instead.
However, that table has both _Dialog and Control as key columns, so you need to examine both key columns in order to know if you have the row you want or not, which means you need "SELECT `Dialog_`, `Control`, `Text` , `Property` FROM `Control`" and you compare both r.GetString(1) and r.GetString(2) against your Dialog and Control Id values, respectively. Punctuation matters greatly with Installer's variant of SQL. -----Original Message----- From: Elfe Xu [mailto:elf...@microsoft.com] Sent: Sunday, November 14, 2010 7:37 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Question about using custom action to query control table Hi all, I want to use custom action (written in C# by DTF) to query and update some record in the control table. Here is the code: string query = "SELECT 'Control' , `Text` , `Property` FROM `Control`"; View view = session.Database.OpenView(query); view.Execute(); while (true) { using (Record r = view.Fetch()) { if (r == null) { break; } if (string.Equals(r.GetString(1), controlName, StringComparison.Ordinal)) { //... view.Update(r); break; } } } However, I found r.GetString(1) always return the value "Control", but never the actual control name. I tried "Control.Control" and get the same result. It also happens to columns like "Dialog_", "Property", "Type" etc. So I could I know if the record is the control that I want to update? How could I distinguish it with other controls? Thanks, -Elfe ---------------------------------------------------------------------------- -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users