How can we help you today? How can we help you today?

Invalid characters when saving script from 'View SQL'

When I navigate through the synchronization wizard, I get to the point where I have the option to 'View SQL'. If I click the button, a new window opens up with the SQL in the window. This new window has the option to save the SQL that just popped up. When I save this SQL and open it up from Query Analyzer at another point, it appears with invalid characters that result in a syntax error when the SQL is parsed. It is easily corrected, but I don't think this existed in V5. Below is a paste of the header that usually gets generated. Notice the invalid characters at the beginning.

/*
Script created by SQL Compare version 6.0.0 from Red Gate Software Ltd at 5/21/2007 11:28:36 AM
Run this script on SERVERA.DW_DB to make it the same as SERVERB.DW_DB
Please back up your database before running this script
*/
Dre The DBA
0

Comments

1 comment

  • Michelle T
    The problem that you're encountering is that the beta version of Compare doesn't have a populated 'Encoding' dropdown for saving the SQL script, and is defaulting to saving it as UTF-8 With Preamble. The three characters you see at the start of the script are the preamble.

    If you load up the script with Management Studio, it understands the syntax and the characters do not appear, but if you load it up with Query Analyser, QA doesn't understand that it's UTF-8 With Preamble and just shows you the characters.

    In the final release version, there will be a drop-down menu in this save dialog so that you can choose Unicode or ASCII format, which QA will recognise and open correctly.
    Michelle T
    0

Add comment

Please sign in to leave a comment.