How to edit Package scripts

aperregatturvaperregatturv Posts: 67
edited February 3, 2006 1:31PM in SQL Packager Previous Versions
Hi,

I created the package to update an existing database but there is a table with duplicate values and now new update i m trying create a primary key.
I need to add delete command to the script before i can make the .NET executable.

How do edit the packaged SQL scripts.

Thanks

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    The only way to change a package after it's been scripted is to save it as a c# project and edit the resources. This can be accomplished by using something like Visual Studio's resource editor.
  • New problem:

    SQL Packager created a new C# Project for creating a new database and I made some minor changes to the User Interface. Everything was fine. Now, we added few new tables to the database. Do I need to recreate a new C# Project and make the same change(User Interface) what was done before. Why cannot the SQL Packager just update the SQL resource files. It will be very helpful if the User Interface code is untouched.
    Also in the database properties screen, if a BrowseFolder buttons for Log directory and db path directory were added it will help, instead of manually typing in the path.
    Finally, the C# project code generated by SQL Packager is not VS 2005 version, its VS 2003.


    Arun
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Arun,

    The current SQL Bundle is fully compatible with Framework 2.0, but it is built against 1.1. The reason is that we believe most customers are using the proven, stable version of 1.1 rather than leaping straight to the latest framework.

    That doesn't stop you from outputting a c# project package and opening it in VS 2005 if you require the package to run only on Framework 2.0. I don't see what the advantage of doing that would be though!

    Here is also a tip: you can modify the project stored in program files\red gate\sql bundle\sql packager code templates\c#. The changes that you make to this project will be applied to every single SQL Package produced on that computer afterwards. This way to do not need to keep modifying the c# projects just to add a button to the Windows Form.

    Hopefully this helps!
  • Hello Arun,

    The current SQL Bundle is fully compatible with Framework 2.0, but it is built against 1.1. The reason is that we believe most customers are using the proven, stable version of 1.1 rather than leaping straight to the latest framework.

    That doesn't stop you from outputting a c# project package and opening it in VS 2005 if you require the package to run only on Framework 2.0. I don't see what the advantage of doing that would be though!

    Here is also a tip: you can modify the project stored in program files\red gate\sql bundle\sql packager code templates\c#. The changes that you make to this project will be applied to every single SQL Package produced on that computer afterwards. This way to do not need to keep modifying the c# projects just to add a button to the Windows Form.

    Hopefully this helps!

    Agreed. Thanks for the information on the template.
This discussion has been closed.