I am having difficulty running a server end function called GetCustomerID. Here's the offending piece of code.

Code:
SQLStr = "SELECT CustomerID FROM dbo.GetCustomerID('" + IPAddr + "')"
SQLComm.CommandText = SQLStr
txtVisitNo.Text = Str(SQLComm.ExecuteScalar())
whenever I execute it I receive the following error message....
Invalid object name 'dbo.GetCustomerID'

Has anybody got an idea as to why this is occuring? The function is definatley on the server.

Cheers,
Jonathan