Bugs item #1827123, was opened at 2007-11-06 23:30
Message generated for change (Comment added) made by ipm-fedorov
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1827123&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: v3.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: afedorov (ipm-fedorov)
Assigned to: pmarcu (pmarcu)
>Summary: Can't create sql database with name contains '-'

Initial Comment:
If the name of SQL database contains '-' symbol then the error -2147217900 
appears during execution sql scripts.

msi log: "CreateDatabase:  Error 0x80040e14: failed to create to database: 
'Reports-001', error: Incorrect syntax near '-'."

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

>Comment By: afedorov (ipm-fedorov)
Date: 2008-05-04 12:33

Message:
Logged In: YES 
user_id=1889945
Originator: YES

Peter, please fix this bug.

The bug is in the sql script for create and drop database.
now used following script: CREATE DATABASE NewDatabaseName-ForReports
the corrected script is: CREATE DATABASE [NewDatabaseName-ForReports]

To fix this problem following changes needed in file
src\dutil\strutil.cpp

OLD CODE: hr = StrAllocFormatted(&pwzQuery, L"CREATE DATABASE %s %s%s
%s%s", wzDatabase, pwzDbFile ? L"ON " : L"", pwzDbFile ? pwzDbFile : L"",
pwzLogFile ? L"LOG ON " : L"", pwzLogFile ? pwzLogFile : L"");

NEW CODE: hr = StrAllocFormatted(&pwzQuery, L"CREATE DATABASE [%s] %s%s
%s%s", wzDatabase, pwzDbFile ? L"ON " : L"", pwzDbFile ? pwzDbFile : L"",
pwzLogFile ? L"LOG ON " : L"", pwzLogFile ? pwzLogFile : L"");

OLD CODE: hr = StrAllocFormatted(&pwzQuery, L"DROP DATABASE %s",
wzDatabase);
NEW CODE: hr = StrAllocFormatted(&pwzQuery, L"DROP DATABASE [%s]",
wzDatabase);

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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to