Upgrading from Windows 2000 to Windows 2003 and Sharepoint

April 27th, 2004 by andrewjvelez

This is actually a problem with the Windows upgrade, but nonetheless the problem manifested itself while trying to install the sharepoint central database.

I had a development computer that was running Windows 2000 Server.  I wanted to run SharePoint and use Visual Studio.Net 2003 to create some web parts.  However, to do so, I had to upgrade to Windows 2003 Server.  Normally I don't upgrade, since problems occur.  However, I had heard some good things with the upgrade wizard. Note to self: never believe them.  The upgrade itself went smoothly, however, I started having problems once I tried installing SharePoint.

The installation itself was smooth, but once I had to configure/create the central database, I started having problems.  I'd fill out all the information, but every time I'd click submit I would be forwarded to a generic error message screen.  I then tried creating the DB from the command line, by running: “stsadm -o setconfigdb -databaseserver [name] -databasename [db name]” Then I got a decent error: GetTextExtentPointI could not be located in msdart.dll.  I found some good information here, and it fixed my problem for now.  Basically, you need to copy over the oledb32.dll from another server that got a fresh install of Windows Server 2003 to the upgrade server.

I hope that helps someone else out.

Upgrading from Windows 2000 to Windows 2003 and Sharepoint

April 27th, 2004 by andrewjvelez

This is actually a problem with the Windows upgrade, but nonetheless the problem manifested itself while trying to install the sharepoint central database.

I had a development computer that was running Windows 2000 Server.  I wanted to run SharePoint and use Visual Studio.Net 2003 to create some web parts.  However, to do so, I had to upgrade to Windows 2003 Server.  Normally I don't upgrade, since problems occur.  However, I had heard some good things with the upgrade wizard. Note to self: never believe them.  The upgrade itself went smoothly, however, I started having problems once I tried installing SharePoint.

The installation itself was smooth, but once I had to configure/create the central database, I started having problems.  I'd fill out all the information, but every time I'd click submit I would be forwarded to a generic error message screen.  I then tried creating the DB from the command line, by running: “stsadm -o setconfigdb -databaseserver [name] -databasename [db name]” Then I got a decent error: GetTextExtentPointI could not be located in msdart.dll.  I found some good information here, and it fixed my problem for now.  Basically, you need to copy over the oledb32.dll from another server that got a fresh install of Windows Server 2003 to the upgrade server.

I hope that helps someone else out.

Microsoft and the CSS demons

April 23rd, 2004 by andrewjvelez

Like I've mentioned before, I've customized a lot of my sharepoint site by changing the style sheet and backend standard graphics.  Unfortunately, the limitation is that you have to rely on Microsoft  to properly assign stylesheet classes properly to all the elements. For reference, here's a link to a screen shot of my page, since the gallery still won't work.

My latest issue was that a user suggested the colors in the list view nav bar change from the default blue to white.  I didn't have a problem with this one bit – I viewed the source of the list page, found the link, and saw that it belonged to class ms-toolbar (fairly intuitive, huh?).  So I opened the style sheet (Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033STYLES – default location) and changed the sheet to have color: #FFFFFF;.  Problem solved.

However, someone coding the web part had a brain fart, because any links within the web part are assigned the same class.  However, the background at this point is also white, so you get invisible text.  I didn't even realize that until I got another complaint not 5 minutes later.  Unfortunately, this wasn't a case of a higher level tag being assigned the ms-toolbar class: it was the a tag itself.  Now, will someone please explain why your class would be called ms-toolbar, and you'd have something in the main content window be assigned to the ms-toolbar class?  It didn't and still doesn't compute for me.

So, if anyone out there has any ideas for how to work around this, I'd love to hear them.  Right now, I just changed the color of ms-toolbar to #990000 so that you can see it in both places.  It's still hard to see against my orange background, though.  Shoot me a line if you have any ideas.

Microsoft and the CSS demons

April 23rd, 2004 by andrewjvelez

Like I've mentioned before, I've customized a lot of my sharepoint site by changing the style sheet and backend standard graphics.  Unfortunately, the limitation is that you have to rely on Microsoft  to properly assign stylesheet classes properly to all the elements. For reference, here's a link to a screen shot of my page, since the gallery still won't work.

My latest issue was that a user suggested the colors in the list view nav bar change from the default blue to white.  I didn't have a problem with this one bit – I viewed the source of the list page, found the link, and saw that it belonged to class ms-toolbar (fairly intuitive, huh?).  So I opened the style sheet (Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033STYLES – default location) and changed the sheet to have color: #FFFFFF;.  Problem solved.

However, someone coding the web part had a brain fart, because any links within the web part are assigned the same class.  However, the background at this point is also white, so you get invisible text.  I didn't even realize that until I got another complaint not 5 minutes later.  Unfortunately, this wasn't a case of a higher level tag being assigned the ms-toolbar class: it was the a tag itself.  Now, will someone please explain why your class would be called ms-toolbar, and you'd have something in the main content window be assigned to the ms-toolbar class?  It didn't and still doesn't compute for me.

So, if anyone out there has any ideas for how to work around this, I'd love to hear them.  Right now, I just changed the color of ms-toolbar to #990000 so that you can see it in both places.  It's still hard to see against my orange background, though.  Shoot me a line if you have any ideas.

Alright! Got the listeners to work!

April 9th, 2004 by andrewjvelez

Addendum: People have been asking me why I wanted to do this. I explained it in a previous blog (I think) but here's the short version:

I have an Issues List for internal system operations.  If a phone goes down, or a computer dies, a user could enter a ticket into the system. However, most of our users are ignorant as to who would fix each type of issue.  So I have two drop down boxes: a Category and Assigned to.  When you select a certain category, the assigned to box automatically changes to the person who handles that type of issue. The “listener” therefore is used to listen to the onChange event for the category.

——————————————————————————

W00t!  I got the listeners to work.  Here is the JavaScript, and then I'll explain it below:

window.onload = startup;
function startup()
{
 setAssignment();
 document.forms[0].elements[getElementIndex("OWS:Category")].onchange = setAssignment;
}

function setAssignment()
{
 var getCategoryTagIndex, getAssignToTagIndex, getCategoryText;
 getAssignedToTagIndex = getElementIndex("AssignedTo");
 getCategoryTagIndex = getElementIndex("OWS:Category");
 getCategoryText = getSelectedElement(document.forms[0].elements[getCategoryTagIndex]);
 setAssignedTo(document.forms[0].elements[getCategoryTagIndex], document.forms[0].elements[getAssignedToTagIndex]); 
}

function setAssignedTo(CategoryObj,AssignedToObj)
{
 switch(CategoryObj.options[CategoryObj.selectedIndex].text)
 {
  case "LoopNet.com website error":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "InsideLoop website error/suggestion":
   searchAssignedTo("[User Name", AssignedToObj);
   break;
  case "E-mail":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Network file access":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Phone problem":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Local workstation problem":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Other":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  default:
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
 }
}
function searchAssignedTo(userName, AssignedToObj)
{
 for(i = 0; i < AssignedToObj.options.length; i++)
 {
  if (userName.toLowerCase() == AssignedToObj.optionsIdea.text.toLowerCase())
  {
   AssignedToObj.optionsIdea.selected = true;
   return;
  }
 }
}
function getSelectedElement(selectObj)
{
 return selectObj.options[selectObj.selectedIndex].text;
}
function getElementIndex(elementName)
{
 var e;
 e = -1;
 for (i = 1; i
 {
  var temp;
  temp = document.forms[0].elementsIdea.name;
  if(temp.indexOf(elementName)>= 0)
   {
   e = i;
   break;
   }
 }
 return e; 
}

//–>

I hope this shows up, since it's javascript. Basically I put this at the end of my issues form, right after the end table tag. This is so that the page loads before the script runs, allowing time for the web part to load.  The first thing I do is set the window.onload event handler to be my startup function.  That way the values are set on every page load.  Within that I run two other commands.  First, I run the setAssignment function, to do the initial setting of the assigned task, just in case the user doesn't change it.  Then I set the onchange event for my Category to be the setAssignment again.  You'll notice a couple of things.  First of all, we aren't sure of the names of the form or the drop down list.  So instead of using the name, we use the forms[0] element and then search for the element index for the category drop down list.  So, here's a description of the functions:

startup: is the window.onload event handler
setAssignment: the event handler for the Category select drop down box. It calls the functions to find the indexes of the Assigned To box and the Category box, then passes those objects to the actual function that changes the assignment.
setAssignedTo: the function that actually changes the assignment. It takes two parameters: the assigned to box object and the category box object. It reads the category, then loops through a switch. The switch reads the category, and then sets the proper assignment. If none of the options are found, then it sets the assignment to the administrator (me).
searchAssignedTo: basically just a loop that checks the the name given to the name in the assignment box. If they are the same, it sets that selectedIndex to true. It could be included in the setAssignedTo function, but this saves having to code it a grip of times
getSelectedElement: gets the name of the element passed to it. I had it here for debugging purposes; it can be removed.
getElementIndex: gets the index of the element that matches the string you pass into it. Be careful here. You want ot make sure that you pass the right name in. I thought I could search for an element with the word Category in it, but you can't. You need to look for OWS:Category. So watch yourself. You can find these names by opening the form and then browsing through the source.

So that's basically it. Let me know if you have any questions on this, and I'll be happy to explain. It took a team effort here to come up with the right script. Hopefully this will save you some time.

Alright! Got the listeners to work!

April 9th, 2004 by andrewjvelez

Addendum: People have been asking me why I wanted to do this. I explained it in a previous blog (I think) but here's the short version:

I have an Issues List for internal system operations.  If a phone goes down, or a computer dies, a user could enter a ticket into the system. However, most of our users are ignorant as to who would fix each type of issue.  So I have two drop down boxes: a Category and Assigned to.  When you select a certain category, the assigned to box automatically changes to the person who handles that type of issue. The “listener” therefore is used to listen to the onChange event for the category.

——————————————————————————

W00t!  I got the listeners to work.  Here is the JavaScript, and then I'll explain it below:

window.onload = startup;
function startup()
{
 setAssignment();
 document.forms[0].elements[getElementIndex("OWS:Category")].onchange = setAssignment;
}

function setAssignment()
{
 var getCategoryTagIndex, getAssignToTagIndex, getCategoryText;
 getAssignedToTagIndex = getElementIndex("AssignedTo");
 getCategoryTagIndex = getElementIndex("OWS:Category");
 getCategoryText = getSelectedElement(document.forms[0].elements[getCategoryTagIndex]);
 setAssignedTo(document.forms[0].elements[getCategoryTagIndex], document.forms[0].elements[getAssignedToTagIndex]); 
}

function setAssignedTo(CategoryObj,AssignedToObj)
{
 switch(CategoryObj.options[CategoryObj.selectedIndex].text)
 {
  case "LoopNet.com website error":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "InsideLoop website error/suggestion":
   searchAssignedTo("[User Name", AssignedToObj);
   break;
  case "E-mail":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Network file access":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Phone problem":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Local workstation problem":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  case "Other":
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
  default:
   searchAssignedTo("[User Name]", AssignedToObj);
   break;
 }
}
function searchAssignedTo(userName, AssignedToObj)
{
 for(i = 0; i < AssignedToObj.options.length; i++)
 {
  if (userName.toLowerCase() == AssignedToObj.optionsIdea.text.toLowerCase())
  {
   AssignedToObj.optionsIdea.selected = true;
   return;
  }
 }
}
function getSelectedElement(selectObj)
{
 return selectObj.options[selectObj.selectedIndex].text;
}
function getElementIndex(elementName)
{
 var e;
 e = -1;
 for (i = 1; i
 {
  var temp;
  temp = document.forms[0].elementsIdea.name;
  if(temp.indexOf(elementName)>= 0)
   {
   e = i;
   break;
   }
 }
 return e; 
}

//–>

I hope this shows up, since it's javascript. Basically I put this at the end of my issues form, right after the end table tag. This is so that the page loads before the script runs, allowing time for the web part to load.  The first thing I do is set the window.onload event handler to be my startup function.  That way the values are set on every page load.  Within that I run two other commands.  First, I run the setAssignment function, to do the initial setting of the assigned task, just in case the user doesn't change it.  Then I set the onchange event for my Category to be the setAssignment again.  You'll notice a couple of things.  First of all, we aren't sure of the names of the form or the drop down list.  So instead of using the name, we use the forms[0] element and then search for the element index for the category drop down list.  So, here's a description of the functions:

startup: is the window.onload event handler
setAssignment: the event handler for the Category select drop down box. It calls the functions to find the indexes of the Assigned To box and the Category box, then passes those objects to the actual function that changes the assignment.
setAssignedTo: the function that actually changes the assignment. It takes two parameters: the assigned to box object and the category box object. It reads the category, then loops through a switch. The switch reads the category, and then sets the proper assignment. If none of the options are found, then it sets the assignment to the administrator (me).
searchAssignedTo: basically just a loop that checks the the name given to the name in the assignment box. If they are the same, it sets that selectedIndex to true. It could be included in the setAssignedTo function, but this saves having to code it a grip of times
getSelectedElement: gets the name of the element passed to it. I had it here for debugging purposes; it can be removed.
getElementIndex: gets the index of the element that matches the string you pass into it. Be careful here. You want ot make sure that you pass the right name in. I thought I could search for an element with the word Category in it, but you can't. You need to look for OWS:Category. So watch yourself. You can find these names by opening the form and then browsing through the source.

So that's basically it. Let me know if you have any questions on this, and I'll be happy to explain. It took a team effort here to come up with the right script. Hopefully this will save you some time.

Setting up JavaScript listeners

April 7th, 2004 by andrewjvelez

UPDATE: I got this to work – see the next post!

So I'm trying to set up a listener on my Issues list.  It's not going well.  Microsoft looks to be using some kind of custom drop down box, rather than a stardard select.  It's killing me.  When I find out how to fix it, I'll post it here.  Hopefully it won't take more than a day.

Setting up JavaScript listeners

April 7th, 2004 by andrewjvelez

UPDATE: I got this to work – see the next post!

So I'm trying to set up a listener on my Issues list.  It's not going well.  Microsoft looks to be using some kind of custom drop down box, rather than a stardard select.  It's killing me.  When I find out how to fix it, I'll post it here.  Hopefully it won't take more than a day.

SQL Frustrations

March 31st, 2004 by andrewjvelez

Well, I blew it already on my WSS server.  I installed WSS on it before I installed SQL Server, so it installed the MSDE database instead.  Well, I tried to upgrade it to SQL Server 2000, SP 3, but I couldn't get it to upgrade correctly.  Instead of upgrading the MSDE database, it installed SQL along side it, and I don't know if it transfered the data.  I couldn't get the SQL Server service started, and I couldn't get into MSDE via Enterprise Manager.  I'm glad 99% of my customization at this point had been to the .CSS and XML files rather than the database.  I've backed that up.

I tried uninstalling, well, everything, but there was a problem with the MSSearch service.  For whatever reason, it decided it wanted to install itself on my network home directory (H: drive).  I couldn't get it off.  I removed all the registry entries I could find for SQL, I removed the registry entries under HKLMService for MSSearch, and I tried simply reinstalling SQL.  Nothing worked.  SQL would install OK for me, but when I tried applying SP3, it would fail on MSSearch.

So, I'm doing the only thing left to do now: reinstall Windows 2003 from scratch.  Oh well…previously I had used Windows Server 2003 Standard when I wanted to use the Web Server Edition.  I couldn't find the disks at the time, but I found them now, so I get to have that right, at least.

A word from the newly experienced: if you plan on using SQL Server, select Web Farm configuration during WSS installation, and more importantly, install SQL Server BEFORE you install WSS.  In writing that last sentence, it all seems pretty obvious, but I guess when you feel you know what you're doing, you get careless.

Good luck to you!

Andrew

SQL Frustrations

March 31st, 2004 by andrewjvelez

Well, I blew it already on my WSS server.  I installed WSS on it before I installed SQL Server, so it installed the MSDE database instead.  Well, I tried to upgrade it to SQL Server 2000, SP 3, but I couldn't get it to upgrade correctly.  Instead of upgrading the MSDE database, it installed SQL along side it, and I don't know if it transfered the data.  I couldn't get the SQL Server service started, and I couldn't get into MSDE via Enterprise Manager.  I'm glad 99% of my customization at this point had been to the .CSS and XML files rather than the database.  I've backed that up.

I tried uninstalling, well, everything, but there was a problem with the MSSearch service.  For whatever reason, it decided it wanted to install itself on my network home directory (H: drive).  I couldn't get it off.  I removed all the registry entries I could find for SQL, I removed the registry entries under HKLMService for MSSearch, and I tried simply reinstalling SQL.  Nothing worked.  SQL would install OK for me, but when I tried applying SP3, it would fail on MSSearch.

So, I'm doing the only thing left to do now: reinstall Windows 2003 from scratch.  Oh well…previously I had used Windows Server 2003 Standard when I wanted to use the Web Server Edition.  I couldn't find the disks at the time, but I found them now, so I get to have that right, at least.

A word from the newly experienced: if you plan on using SQL Server, select Web Farm configuration during WSS installation, and more importantly, install SQL Server BEFORE you install WSS.  In writing that last sentence, it all seems pretty obvious, but I guess when you feel you know what you're doing, you get careless.

Good luck to you!

Andrew