Archive

Posts Tagged ‘Personal’

New Layout

December 1, 2009 Leave a comment

Well, here is a new layout. Not because I got tired of the old one, but because I was playing around with the new themes and accidentally applied it. No worries, I can change it back to the old one. Where is the old one? It’s gone! So this one until I figure out how to get the old one back.

Advertisements
Categories: Personal Tags: ,

Publishing your PowerPoint presentation to a slides library


As a result of the heavy workload of my colleagues and myself, we decided to make use of the slide library built in Moss 2007 to prepare our team presentation instead of having the Powerpoint somewhere in our Moss 2007 environment as a single document. We created a document workspace, added a slide library to it, opened up PowerPoint 2007 and selected Publish to publish our PowerPoint presentation as a slide library. There was no option available to publish it! I checked to make sure that I had the Professional version of Office 2007 on my laptop. I did. After some reseach, and doublechecking Microsoft’s post about publishing slides I figured I did nothing wrong. When going thorugh Patrick Luca’s Blog I found out that even in the Professional version of PowerPoint 2007 you are unable to do so. Only Microsoft Office Professional Plus, Enterprise and Ultimate support this feature. Keep this in mind when talking to clients about this feature, as it might imply a complete rollout of a new Office version (which you probably did not foresee in your initial scope)

Categories: SharePoint 2007 Tags: ,

retrieving the com class factory with clsid {3d42CCB1 – …


Today we had a nice error at the customer: retrieving the com class factory with clsid {3d42CCB1 – … when we tried to access the search settings of the Shared Service Provider. After a lot of searching, on the web and in blogs, we identified similar problems. All of them seemed to be linked to the user running the “Office SharePoint Server Search” service. After checking the event log we saw that the user running the service seemed to have a bad password, making it unable to access the content.

It’s the second time that we identify a service that seems to be running on a wrong password (no clue how that is possible) , but only starts giving errors at the moment when it is being used.
Fixing the password did all we needed. Make sure that you also give the identity the service is running under has logon as a service rights.

Categories: SharePoint 2007 Tags:

Archive: Team System 2008 Beta 2 up and running


Thank you Microsoft. After the major failure on the installation package on VSTS 2005 you actually made a nice install for VSTS 2008 Beta 2. The notification before the setup that you need to use a domain account to do the install instead of an unspecified error in the middle of the installation, the ability to use non-default sql instances, the ability to log in on TS as a different user from a client using Team Explorer (quite handy that you don’t need to log in as TFSSETUP on your machine, you can log in directly into TS with that account), …
Only one error popped up while connecting to Team System after the setup, and it was due to the websites not being up, not some crazy identity that was wrong or some error message that explained nothing. Two thumbs up 🙂

Categories: Team System Tags:

Look of LINQ


I finally decided to take a look at LINQ. A quick google around took me some time to figure out how to get a full example working (which references are needed etcetera…) Therefor I decided to write a quick tutorial on how to work with DLINQ. To make this sample working you should create a SQL Server database Blog with 1 table in it called Post. In that table you will have id, title and body as columns, where id is a unique identifier (int auto-increment)
Create a new asp.net website project and add a class library called Business to it as well.Rename Class1.cs to Post.cs (also make sure the class is renamed to Post)
Ok, now we are good to go. First of all we will add the connectionstring to our web.config:

<connectionStrings>
<add name=BlogConn
connectionString=Data Source=(local);Initial Catalog=Blog;Integrated Security=True

providerName=System.Data.SqlClient />
</connectionStrings>

Your app.config should look like the above. Now, what we will do first is create a class named Post and add all the private variables to it and the properties.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace Business
{
[Table(Name = “Post”)]
public class Post
{
private int _id;
private string _title;
private string _body;
[Column(Storage=“_id” , IsPrimaryKey=true)]
public int Id
{
get { return _id; }
set { _id = value; }
}
[Column(Storage=“_title”)]
public string Titel
{
get { return _title; }
set { _title = value; }
}
[Column(Storage=“_body”)]
public string Body
{
get { return _body; }
set { _body = value; }
}
}
}

 

If you put it like this, it will not compile. Add a reference to the System.Data.Linq dll and then your business should compile. What does all of the tags above the properties mean: [Table(Name = “Post”)] : it tells LINQ how the table is called in the database
[Column(Storage=”_id” , IsPrimaryKey=true)] : this property is stored in the private variable _id. Should our table column name be different from id, we would have to use [Column(Storage=”_id” , Name”DBColumnName”, IsPrimaryKey=true)]
Ok, so now we have connected Linq to the database fields. How do we tell Linq which database to do and what queries to perform?
We will create a new class in the Business Project called “BlogDB”. That class will look like the following:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Linq;

namespace Business
{
class BlogDB : DataContext
{
public Table<Post> Post;
public BlogDB(string connection) : base(connection) { }
}
}

This class just exists to make our life a bit easier. BlogDB inherits from DataContext. The DataContext class allows you to use any data holder (xml, array,…) as datasource for your LINQ code. Now up to the LINQ work. I made a Posts class that is a Collection of Post classitems:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Configuration;

namespace Business
{
public class Posts : CollectionBase
{
public void GetAllPosts()
{
BlogDB db = new BlogDB(ConfigurationManager.ConnectionStrings[“BlogConn”].ConnectionString);
var q =
from p in db.Post
where p.Titel == “Test”
select p;
foreach (var pst in q)
base.InnerList.Add(pst);
}
}
}

For those who aren’t familiar with ConfigurationManager, it’s the next gen version of ConfigurationSettings.AppSettings. To make it work a simple using System.Configuration will not do the trick. You will need to manually add the System.Configuration.dll to your references. Ok, so now we have a collection that contains all the posts that have test as title. Add a few items to your database of which at least 1 has test or Test as title. What we are doing here is getting all teh posts with the LINQ query:

var q = from p in db.Post
where p.Titel == “Test”
select p;

 

and then putting all the results in the collection. One more step to go is showing it on screen. Add a dropdownlist to your web form in your web project and then put the following codebehind:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Business;
namespace Blog
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Posts p = new Posts();
p.GetAllPosts();
DropDownList1.DataSource = p;
DropDownList1.DataTextField = “Titel”;
DropDownList1.DataBind();
}
}
}

 

Load it up and everything should work just fine. Don’t hesitate to ask me questions through the comments.

Categories: Development Tags:

Archive: It’s a boy


Yep, we went to the doctor last night who checked up on the baby. Everything is fine and there was some remarkable distinction that showed us it was a boy that is coming our way in March. Now the hard task of finding a name 🙂

Categories: Personal Tags: