Red Gate forums :: View topic - C# packager issues
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager Previous Versions
SQL Packager Previous Versions forum

C# packager issues

Search in SQL Packager Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
jbrown



Joined: 13 Sep 2008
Posts: 12

PostPosted: Fri Sep 19, 2008 6:07 pm    Post subject: C# packager issues Reply with quote

I noticed a few annoyances in the C# packager.

#1

In FormAbout, linkLabel1_LinkClicked, if you change the hypertext to point to "yourcompany.com", you must also change this:

string text2LookFor = "yourcompany.com"

if you don't, the click area will start at -1 because it's assumed that the "text to look for" is always found.

#2

... then at run time you get a very weird error in packagemain.cs, showmsg:

if(m_ConsoleMode) //Console
{
Console.WriteLine("\n\n"+msgTypeText);
Console.Write(message + "\r\n");


because the error is in the coding (string text2lookfor is never found), m_ConsoleMode is not properly initialized, the application thinks its running in console mode, and it throws an IOException.

#3

When you first open PackageExecutor.cs in VS, you'll receive an error stating that the line endings are inconsistent, and VS prompts you to convert all line endings to CR LF.

#4

In FormSelectDatabase, textBoxInformation, the Text property reads:

"This executable will upgrade an existing database or create a new database. Please choose the server and database you would like to upgrade or create."

Changing it in the text box's properties does little good however, unless you deal with this:


if(this.radioButtonUpgradeDatabase.Checked)
this.textBoxInformation.Text = "This executable will upgrade an existing database. Please choose the server and database you would like to upgrade.";
else
this.textBoxInformation.Text = "This executable will create a new database. Please choose the server and database you would like to create.";

(You never see the text that displays from the textBox's properties, in other words, because it's always overwritten by one or the other of these nearly identical variants).



Not strictly C# issues:

# 5

if you include users in your package and you choose to "upgrade an existing database", the package will error because the users already exist.

# 6

the database settings are not available in the packager: specifically we need to be able to "SET trustworthy ON" during database creation.
Back to top
View user's profile Send private message
jbrown



Joined: 13 Sep 2008
Posts: 12

PostPosted: Fri Sep 19, 2008 10:51 pm    Post subject: more .. Reply with quote

#7

when editing the package templates (SQL Packager 5\SQL Packager Code Templates), you cannot open the designer for MessageBox.cs. Error says "The variable 'messageBoxIcon1' is either undeclared or was never assigned. "

#8

if you encounter a SQL error when building a new database (e.g. a database the same name already exists, etc.) the application attempts a catch and then blows up at PackageExecutor.cs, Execute() at "throw;":

public void Execute()
{
try
{
OnStatus(new ProgressStatusEventArgs("Connecting To Database", 0));
ConnectToDatabase(); //Connect to database
ExecutePackage();
}
catch //If any exception then potentially delete the database if I made it///
{
DeleteDatabaseIfMade();
throw;
}
}
Back to top
View user's profile Send private message
Matthew Flatt



Joined: 15 Jan 2008
Posts: 253

PostPosted: Fri Oct 10, 2008 10:43 am    Post subject: Reply with quote

Hi jbrown,

If you haven't received the e-mail from Chris, this has been logged in our bug tracking software and will be reviewed for the next release.

Thanks,
_________________
Matthew Flatt
Test Engineer, HyperBac
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group