Archive for November, 2008


SSEE, WSS, MOSS and SQL Server 2005 Express

The purpose of this article is to simply clarify what type of database the stand-alone installation of WSS 3.0 actually uses.

SSEE, or SQL Server 2005 Embedded Edition, is the database that’s installed with a stand-alone configuration of WSS 3.0. SSEE is just an alternative name for Windows Internal Database. The following is directly from Wikipedia:

“Windows Internal Database is an alternative name for Microsoft SQL Server 2005 Embedded Edition (SSEE). The term is used in the documentation for such applications as Windows SharePoint Services 3.0, Windows Server Update Services 3.0 and Windows Server 2008, where it is installed as a back-end database. SQL Server Embedded Edition is just a specially configured named instance of the SQL Server Express database engine which can be accessed only by certain Windows Services, or by SQL Server Management Studio Express using \\.\pipe\mssql$microsoft##ssee\sql\query as server name.”

That clarified a lot for me. If you’ve got SSEE installed in a WSS 3.0 configuration and you’d like to get access to the databases on that server (be careful when making any changes though!), you’ll need to download SQL Server Management Studio Express from here.

Windows Internal Database DOES NOT have any database size limitations.

Once it’s been dowloaded and installed, launch management studio and in the place of server name, put:

\\.\pipe\mssql$microsoft##ssee\sql\query

That should do it, you should now see your WSS 3.0 databases.

When MOSS is deployed using the Basic option, SQL Express 2005 gets installed.

SQL Express 2005 DOES have a database size limitation of 4GB.

How to Write an SPQuery to Sort Your List

If you’re working with an SPListItemCollection, you might have the need to sort the data that stored in the collection. The best way I’ve found to do this is to build an SPQuery object and use that to actually query for the information. Using an object of this type makes it possible to send in whatever sort and/or orderby clause we’d like to use.

For example:

1
<OrderBy><FieldRef Name='EventDate' Ascending='FALSE'></FieldRef></OrderBy>

The full query would look something like this:

1
2
3
4
5
SPQuery oQuery = new SPQuery();
 
oQuery.Query = "<Where><Eq><FieldRef Name='AP_x0020__x002f__x0020_O'/>" +
"<Value Type='Text'>" + fruitName + "</Value></Eq></Where>" +
"<OrderBy><FieldRef Name='EventDate' Ascending='FALSE'></FieldRef></OrderBy>";

If you receive an error similar to:

One or more field types are not installed properly. Go to the list settings page to delete these fields.

Then you’ve set the FieldRef Name incorrectly. The trick to resolving this is:

  1. Navigate to your list that the column/field is contained within
  2. Click the New button as you normally would to create a new item in this list
  3. Click on View, Source from the toolbar in your browser window.
  4. Finally, do a find on the phrase fieldinternalname and locate the field you’re trying to query on
  5. Whatever value is stored in fieldinternalname is what you’ll want to use in your query

Any questions, let me know.

UPDATE: I recently discovered another trick to this. If you want to avoid having to seek out what the internal name of a particular field is, when you first name your column, do not include any spaces or special characters. Once the field (column) has been created, go back and rename the field to include the spaces or special characters as desired. SharePoint will still retain the original field name without spaces and you can use that directly in your query without issue.

Powered by WordPress | Theme: Motion by 85ideas.