Bugs item #1440141, was opened at 2006-02-28 01:42
Message generated for change (Comment added) made by dgutride
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1440141&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: extensions
Group: v2.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Osmond (mosmond)
Assigned to: Scott Kurtzeborn (scotk)
Summary:  ConfirmOverwrite in Create SQL Database not working

Initial Comment:
Using the SQL Database  Element.

Appears to be a bug where if you set ConfirmOverwrite 
to yes, and the installer prompts that a database 
exists, continue yes/no; if I select no, the install 
scripts are
executed anyway.   I am not actually a developer, but 
I took a look at
the CustomAction and I think there is a problem in 
scaexec.cpp - 

In the function CreateDatabase

        if (iAttributes & SCADB_CONFIRM_OVERWRITE)
        {
                // Check if the database already 
exists
                hr = SqlDatabaseExists(pwzServer, 
pwzInstance, pwzDatabase, fIntegratedAuth, pwzUser, 
pwzPassword, &bstrErrorDescription);
                MessageExitOnFailure2(hr, 
msierrSQLFailedCreateDatabase, "failed to check if 
database exists: '%S', error: %S", pwzDatabase, NULL 
== bstrErrorDescription ? L"unknown error" : 
bstrErrorDescription);

                if (S_OK == hr) // found an existing 
database, confirm that they don't want to stop before 
it gets trampled
                {
                        if (IDNO ==
WcaErrorMessage(msierrSQLDatabaseAlreadyExists, hr, 
MB_YESNO, 1,
pwzDatabase))
                                ExitOnFailure
(hr, "failed to
initialize");
                }
        }

1. hr holds the result of SqlDatabaseExists - which 
is true in the case of this problem.
2. The CA then prompts with a datbase already exists -
 and if the answer is IDNO then it calls 
ExitOnFailure. 
3. But if I read ExitOnFailure(hr, ...) correct, it 
only fails if hr is false, but this will still be 
true as per 1.
4. Result is the CA continues to process the 
CreateDatabase on a response of either yes or no.

Michael

----------------------------------------------------------------------

Comment By: DGutride (dgutride)
Date: 2006-05-15 09:25

Message:
Logged In: YES 
user_id=1204611

I've noticed this same behavior.  When the confirm overwrite
prompt shows up, if you say don't overwrite, the scripts
execute anyway and then the database was dropped when I
tested it.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1440141&group_id=105970


-------------------------------------------------------
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-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to