Monthly Archives: August 2008

iPhone Developer Provision Issue on Device

By | iPhone, Objective-C, Quick Tips | 12 Comments

After a number of compile to iPhone device issues, specifically: “entitlement ‘application-identifier’ has value not permitted by provisioning profile” and “Command /usr/bin/codesign failed with exit code 1”, I have worked out you can have one and only one developer provision and developer application on the iPhone at a time otherwise you get installation errors etc…

I also had to have the correct Bundle Identifier in the Info.plist file and make sure the ‘Code Signing Identity’ and ‘Code Signing Provisioning Profile’ was also correct.

Hopefully this is useful to someone, Good Luck!!!

Quick Tip: C# Current Application Version

By | Quick Tips | 3 Comments

Quick Tip: C# Current Application Version:

System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion;

Take a MSSQL database offline and back online with TSQL

By | Code, Database, MSSQL2005, Software Development, SQL Server, TSQL | One Comment

Take a database offline with TSQL:

— Kill All Other Users Processes And Set The Database To Single User Mode
ALTER DATABASE AdventureWorks
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
— Take Offline
EXEC sp_dboption ‘AdventureWorks’, ‘offline’, ‘TRUE’

And restoring the database back to online with TSQL:

— Allow Users Back In By Setting Multi User Mode On
ALTER DATABASE AdventureWorks SET MULTI_USER
— Bring Back Online
EXEC sp_dboption ‘AdventureWorks’, ‘offline’, ‘FALSE’

C# Tip:Start an application from a C# program

By | .NET, C#, Code, MSSQL2005, Software Development | No Comments

Useful code if you wish to launch an external application:

System.Diagnostics.Process.Start(@"C:\program files\microsoft office\word.exe", @"C:\MyWordDocument.docx");