DigiOz Programming Blog
This error in Microsoft Dynamics CRM 4.0 means that the Server name you have specified does not resolve to the IP Address that the Active Directory is pointing to. A good way to check what IP the CRM Website is expecting is to open up IIS Manager, right-click on the "Microsoft Dynamics CRM" Website, choose "Properties". On the "Web Site" tab under "IP Address", it should say "All Unassigned". If it doesn't say All Unassigned, then the IP Address it has specified is not what the Active Directory is resolving the website to.
A quick workaround can be done as follows as specified by
KB Article 950542:
1. Click Start, click Run, type regedit, and then click OK.
2. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
3. Right-click MSCRM, click New, and then click String Value.
4. In the Name box, type LocalSdkHost.
5. Right-click LocalSdkHost, and then click Modify.
6. In the Value box, type the name of the Microsoft Dynamics CRM server or the host header, and then click OK.
Note Do not specify http:// or the port number.
7. Locate the LocalSdkPort key at the same location. Verify that the port that is listed matches the port that is being used for the CRM Web site.
8. If the value of the LocalSdkPort key is incorrect, right-click LocalSdkPort, and then click Modify. Type the correct port number, and then click OK.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com/
Jun 09 2010 16:27
I was probably one of the last people in my age bracket (35 - 40) to join Facebook and really give it a fair chance. I never really understood what all the hype was about until I tried it out for myself. So what does Facebook really give you in exchange for making your personal information public property?
1. Up to 5000 or so friends, most of which you have probably never met and don't even know.
2. A way to tell others at any given time what you are up to.
3. Easy way to share pictures and videos with others.
4. Quick way to chat with others to tell them things in real time.
5. Easy way to waste a lot of time by playing games such as Farmville!
6. Simple way to join groups that work towards a common cause.
7. Great way to find friends you haven't spoken to for a good 25 years!
So simply put it gives you the illusion of having a life when you really don't! Most people on average spend anywhere from 30 minutes to 4 hours on Facebook. If you really have 4 hours a day to waste on telling others what you did, or what your friends or relatives did, or who went to the bathroom at what time that's fine. But most of us really don't have enough time as it is without creating a fake life, not to mention the amount of private information you are putting on the web that will never EVER go away, that can be used to track you down or open fake credit card accounts on your behalf. So careful what you share!
Having said that, one could argue that playing computer games is a complete waste of time, and it is. But people do it anyway. :)
Pete Soheil
DigiOz Multimedia
www.digioz.com
Jun 07 2010 09:37
Sooner or later any programmer that deals with SQL database will notice that there is no easy to use Text SPLIT function in Microsoft SQL, and by that I mean a function that gives you both the split text and the position of each and lets you select a specific position's data.
Here is one such function that makes life much easier for me:
CREATE FUNCTION [dbo].[fn_SplitText]
(
@RowData NVARCHAR(MAX),
@Delimeter NVARCHAR(MAX)
)
RETURNS @RtnValue TABLE
(
ID INT IDENTITY(1,1),
Data NVARCHAR(MAX)
)
AS
BEGIN
DECLARE @Iterator INT
SET @Iterator = 1
DECLARE @FoundIndex INT
SET @FoundIndex = CHARINDEX(@Delimeter,@RowData)
WHILE (@FoundIndex>0)
BEGIN
INSERT INTO @RtnValue (data)
SELECT
Data = LTRIM(RTRIM(SUBSTRING(@RowData, 1, @FoundIndex - 1)))
SET @RowData = SUBSTRING(@RowData,
@FoundIndex + DATALENGTH(@Delimeter) / 2,
LEN(@RowData))
SET @Iterator = @Iterator + 1
SET @FoundIndex = CHARINDEX(@Delimeter, @RowData)
END
INSERT INTO @RtnValue (Data)
SELECT Data = LTRIM(RTRIM(@RowData))
RETURN
END
The usage of it is pretty simple:
SELECT * FROM fn_SplitText('This|is|a|test','|');
The Split function actually returns a temporary table containing the split data, in this case, it will return the following:
ID | Data
-----------------
1 | This
2 | is
3 | a
4 | test
So if I wanted to select the 2nd substring out of that split I would just say:
SELECT Data FROM fn_SplitText('This|is|a|test','|') WHERE ID = 2;
Which would return "is" to me.
Pete Soheil
DigiOz Multimedia
www.digioz.com
Apr 22 2010 09:32
When it comes to working with Date and Time values in Microsoft SQL Server, sometimes its the simple things that get the best of you. Suppose you have a SQL Table that contains the following columns and record:
id | StartDate | EndDate
-----------------------------------------------------------
1 | 2007-06-14 14:22:32.437 | 2010-04-21 16:37:34.503
So you write a query similar to the following query expecting to get that record:
SELECT * FROM TableName
WHERE StartDate = '6/14/2007'
AND EndDate = '4/21/2010';
Wrong! If your DateTime value has an actual Timestamp other then "00:00:00.000", your query will NOT return any results. This is probably one of the most common DateTime related mistakes programmers make.
To only compare the DATE portion of the DateTime field value, you could use the following SQL query instead:
SELECT * FROM TableName
WHERE CAST(CONVERT(varchar(8), StartDate, 112) AS datetime) = '6/14/2007'
AND CAST(CONVERT(varchar(8), EndDate, 112) AS datetime) = '4/21/2010';
So please, don't write queries like the first one ever again!
Pete Soheil
DigiOz Multimedia
www.digioz.com
Apr 21 2010 23:48
One of the great function VB.NET makes available to developers is the "InNumeric" function. This function returns a boolean value indicating wheather an expression can be evaluated as number or not. If you lookup the definition of it however, you will see that the function supported in C#.
There are several different ways to code a custom function to do the same in C#. Here is one way:
using System;
using System.Text;
using System.Text.RegularExpressions;
public static bool IsNumeric(string psInputString)
{
return Regex.IsMatch(psInputString, "^[0-9]+$");
}
And here is how Microsoft recommends it on
THIS page:
static bool IsNumeric(object Expression)
{
bool isNum;
double retNum;
isNum = Double.TryParse(
Convert.ToString(Expression),
System.Globalization.NumberStyles.Any,
System.Globalization.NumberFormatInfo.InvariantInfo,
out retNum );
return isNum;
}
Either way you will get the same result.
Pete Soheil
DigiOz Multimedia
www.digioz.com
Apr 17 2010 10:41