carldldev,

Not sure why the delete doesn't work. The update looks a bit "odd"... the
bit here:
... & comboText & "') " _

seems to include a closing parenthesis that does not have an open
parenthesis. Are you suppressing errors (not usually a good thing to do)?

Here's a function I have (I can't recall if I've used it or not):
Sub UpdateComboBox(ByVal ComboProp, ByVal ComboOrder, ByVal ComboValue,
ByVal ComboText)
    Dim query
    Dim view
    
    query = "UPDATE `ComboBox` " _
             & " SET `Text` = '" & ComboText & "' " _
             & " WHERE `Property` = '" & ComboProp & "' " _
             & "    AND `Value` = '" & ComboValue & "' " 

    set view = Session.Database.OpenView(query)

    view.Execute
End Sub

Regards,

Rob

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of carlldev
Sent: Thursday, February 01, 2007 4:59 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Adding records to MSI on the fly


Thanks Rob, that did the trick.
Now I have another problem - how do I remove the dummy record from the combo
table?
I have to add the dummy value to the combo for the combo table to be created
in the msi, but then I can't remove it. Here is what I tried

Sub DeleteFromComboBox(ByVal comboProp) 
    Dim query, view
    ' create the query string
    query = "DELETE FROM `ComboBox` WHERE `Property` = '" & comboProp & "'"
    ' create the view object based on the query
    Set view = Session.Database.OpenView(query)
    ' invoke the query to add the combo value
    view.Execute
End Sub

I also tried to update it, but that also doesn't work:
Sub UpdateComboBox(ByVal comboProp, ByVal oldComboValue, ByVal comboOrder,
ByVal comboValue, ByVal comboText) 
    Dim query, view
    ' create the query string
    query = "UPDATE `ComboBox` SET `Order` = " & comboOrder & ", `Value` =
'" & comboValue & "', `Text` = '" & comboText & "') " _
             & " WHERE `Property` = '" & comboProp & "' AND `Value` = '" &
oldComboValue & "' TEMPORARY"
    ' create the view object based on the query
    Set view = Session.Database.OpenView(query)
    ' invoke the query to add the combo value
    view.Execute
End Sub
--
View this message in context:
http://www.nabble.com/Adding-records-to-MSI-on-the-fly-tf3150241.html#a87456
39
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to