List of Apple OSX Terminal Commands

Posted by ben on May 28, 2008

This web site has a list and description of a large amount of Apple OSX Terminal commands:

http://www.ss64.com/osx/

Named Pipes and TCP/IP Connection Strings

Posted by ben on May 28, 2008

Manually Creating a SQL Connection String

There are many different connection strings for connecting to a SQLServer database for C#. Have a look at this web site http://www.connectionstrings.com/?carrier=sqlserver for examples.

I needed to create a connection to a SQLServer and started using this as my connection string:

server=myServer;database=myDatabase;uid=someUser;pwd=somePassword

However I got the following error:

An error has occurred while establishing a connection to the server. 
When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow 
remote connections. (provider: Named Pipes Provider, error: 40 - 
Could not open a connection to SQL Server)

Pipes are actually quite an old technology, but what are they?

Continue reading…

IManage error - The semaphore is set and cannot be closed 1

Posted by ben on May 28, 2008

Using the Interwoven IManage API, I was trying to create a connection to the IManage server and kept getting this error message:

The semaphore is set and cannot be closed.

It turns out that this error message is misleading and can hide a multitude of symptoms. In this case it was returned because the system cannot create a connection to the server, as I had accidentally put in an incorrect server name into my connection method.

I did however do some research into what a semaphore actually is. The choice of word comes from a time when flags were used to signal telegraph messages.

However the Dictionary computer definition of a semaphore is:

semaphores are a software mechanism to regulate process synchronization, proposed by Edsger W. Dijkstra.

Wikipedia gives a more detailed explaination of a semaphore, see below:

A semaphore, in computer science, is a protected variable (an entity storing a value) or abstract data type (an entity grouping several variables that may or may not be numerical) which constitutes the classic method for restricting access to shared resources, such as shared memory, in a multiprogramming environment (a system where several programs may be executing, or taking turns to execute, at once). Semaphores exist in many variants, though usually the term refers to a counting semaphore, since a binary semaphore is better known as a mutex. A counting semaphore is a counter for a set of available resources, rather than a locked/unlocked flag of a single resource. It was invented by Edsger Dijkstra. Semaphores are the classic solution to preventing race conditions in the dining philosophers problem, although they do not prevent resource deadlocks.

.Net not recognising regional settings 3

Posted by ben on May 23, 2008

The other day I had the following problem. One of my test servers had been setup with US regional settings and should have been setup with UK settings.

The problem had been unnoticed for a while until our C# .Net application tried to call a stored procedure on a database on another server. This database server had UK regional settings. The stored procedure expected to get a date in UK ‘Long format’. The error message was a database error saying something like:

convertion error can't convert from NVarChar to DateTime

As the application was already compiled and being used on a live server I could not modify the code, I therefore had to run SQL Profiler and see what values were being passed into the stored procedure. This is where I saw the US ‘Long Date’ format being passed in.

Continue reading…

Rapid Apps Group for Enterprise 2.0

Posted by ben on May 23, 2008

Welcome to the first post of my blog. It is actually my third attempt at writing a blog so hopefully this will be third time lucky.

I have also started a company with a colleague and you can see our web site:

http://www.rapidappsgroup.com

This company already has a number of software products revolving around Web 2.0 for the Enterprise and SMS services.

Anyway please have a look and let me know what you think.