# Monday, November 05, 2007

You may have read an article by Ben Hunter on sorting the applications in BDD so they are easier to find when adding them to the Task Sequencer of Database Role. The article can be found here.

An issue arose the other day that necessitated the re-ordering of application in BDD. The current build process that I am working on uses Windows Powershell to do a lot of post build customizations. In testing we found that Powershell was being installed before the .Net Framework. This seemed odd to me as we are using a role to installed our Tier 1 application.

After looking into the issue a bit more it seems that BDD does not honour the order of application defined in the role but installs them in the order they are listed in Applications.xml. This was a problem for us so I set about extending the bddsort application so I could specify any order I wanted. Hence BDD Application Sorter was born.

The program is simple to use, all you need to do is open the Applications.xml file, re-order the application and save the file again. I make a back of Applications.xml just in case but I have never had an issue with the program to date.

Anyway, BDD Application Sorter is attached below. Enjoy!

BBDAppsSort.zip (13.74 KB)

Update: New Version to support Microsoft Deployment Toolkit

The version below will work for the Microsoft Deployment Toolkit
MDTAppSort.zip (23.44 KB)

posted on Monday, November 05, 2007 11:46:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [2]
# Tuesday, October 16, 2007

I've been using BDD 2007 a lot lately and I thought it would be nice to get live logging details from BDD rather than using the many .log files that are created. After searching around for possible solution I settled on using a combination of a C# application using HttpListener and a vbscript using MSXML2.ServerXMLHTTP. The logging application is shown below.

To setup the remote logger is fairly simple and the files needed are included below. To use the remote logger do the following:

  1. Download BDD Remote Logger.zip
  2. Copy ZTIGather.xml and ZTIUtility.vbs into your Distribution$\Scripts directory. Do a file compare if you are interested in the changes. There is an addition properity added to ZTIGather.xml called RemoteLogURL and a few lines added to the Logging Class in ZTIUtility.vbs.
  3. Add RemoteLogURL=http://yourmachine:8081/
  4. Start BDDRemoteLogger.exe and ensure that the url prefix is the name of your machine. The URL Prefix in BDDRemoteLogger must match what you have in your RemoteLogURL value.
  5. Click start on BDDRemoteLogger and Run BDD as normal.

If you run BDD with RemoteLogURL present and you BDDRemoteLogger is not listening for requests then it will considerably slow down the BDD logging (approximately 1sec per entry). So if RemoteLogURL is present in Bootstrap.ini then make sure you have the logger running. If RemoteLogURL is not present BDD will run as norma.

If you've got any questions or comments please comment to this post.

BDD Remote Logger.zip (25.5 KB)
posted on Tuesday, October 16, 2007 12:23:08 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [2]
# Thursday, May 12, 2005

Ever seen this before:
Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.

Well 7 hours later after reading and debugging and then reading and debugging some more I finally found a solution. What I was trying to do was something like this

Sub addData(sender As Object, e As EventArgs)
 Dim objConn As OleDbConnection
 Dim objCmd As OleDbCommand
 Dim objRdr As OleDbDataReader
 
 objConn = new OleDbConnection(“xxxx")
 
 objCmd = new OleDbCommand("INSERT INTO MyTable(Name, Email, Password)VALUES (@Name, @Email, @Password);",objConn)
    
    'add all our parameters
   objCmd.Parameters.Add("@Name", "UserID")
   objCmd.Parameters.Add("@Email", "no@no.com")
   objCmd.Parameters.Add("@Password", "hardpassword")
 
 objConn.Open()
 Dim blnReturn as Boolean = objCmd.ExecuteNonQuery()
 objConn.Close
 
 If blnReturn THen
  lblError.Text = "Success"
 End If
End Sub

The database being used was Microsoft Access 2003. The insert statement would run perfectly in Access but via ADO.net..nope...Invalid Synatax! As it turns out all the different implementations of SQL have a different set of reserved words, password being one of them. Simply placing [] around the value in question fixes the problem. So what are all these reserved words?

http://office.microsoft.com/en-au/assistance/HP010322491033.aspx - for Access 2003
http://office.microsoft.com/en-au/assistance/HP010322481033.aspx - Access Data Types
http://doc.ddart.net/mssql/sql70/ra-rz_8.htm -  SQL Server / MSDE

posted on Thursday, May 12, 2005 10:58:18 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]