Page copy protected against web site content infringement by Copyscape

I had a requirement to show the top 3 of news listing on the home page with the option of having these links open up in a new window.

First read these 2 good articles

http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part/

http://www.heathersolomon.com/blog/articles/customitemstyle/

Now, when it comes to locating the internal name and the field type, you may encounter some issues. Refer to Heather Solomon blog where she has some pointers.

1) Create a site column named "OpenInNewWindow" and make that a choice type with values "true" and "false"

2) Create all other site columns as required.

3) Include the site columns in your custom list.

4) Edit ItemStyle.xsl and include the following lines in your template section

        <xsl:variable name="LinkTarget">   

<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>

        </xsl:variable>

 

You will then be able to use this variable in your <a href> reference target target="{$LinkTarget}"  

Once you create a new item in your list and set the OpenInNewWindow variable, the link will open in a new window if value is set to "true".   

Row Constructors in SQL 2008

Let us delve into using Row Constructors

Two basic tables for test purposes

Customer

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Customer]') AND type in (N'U'))
DROP TABLE [dbo].[Customer]
GO
create table Customer
(firstname varchar(30)
,lastname varchar(30)
)

Customer1

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Customer1]') AND type in (N'U'))
DROP TABLE [dbo].[Customer1]
GO
create table Customer1
(firstname varchar(30)
,lastname varchar(30)
, age int
)

Use with INSERT statement to insert multiple rows as an atomic operation:

— SQL 2005 method
insert into Customer (FirstName, LastName) values (Alex, 'Smith')
go

insert into Customer (FirstName, LastName) VALUES ('John', 'Smith')
go

— another SQL 2005 method

insert into Customer (FirstName, LastName)
select 'Alex', 'Smith'
union all
select 'John', 'Smith'

— Rewriting with SQL 2008

INSERT INTO Customer (FirstName, LastName)
VALUES
 ('Alex', 'Smith'),
 ('John', 'Brown'),
 ('Daniel', 'Williams');

Using Row Constructors as a DataSource – On the Fly!

SELECT *
  FROM
     (
       VALUES

       ('John','Smith')

      ,('Alex','Smith')

     ) Customer(FirstName,LastName)

As  you see above, I just created a datasource named Customer on the fly. Try running this and you will see that the datasource is treated as a table here (not created on SQL Server though).

 

Another example of Row constructors as data source

select c.firstname
, c.lastname
from Customer c
join
(
 values('John','Smith'),('Mary','Smith'),('John','Williams')
) customerTemp(FirstName,LastName)
on c.firstname = customerTemp.firstname 

Ability to include scalar subqueries as elements in row constructors

insert into Customer1
values
('Alex','Smith',30),
('Robert','Smith',35)

insert into Customer(firstname, lastname)
values(
(select top 1 firstname from Customer1),
(select top 1 lastname from Customer1)
)

I will try to do some benchmarks on using Row Constructors on my next post. 

 

Page copy protected against web site content infringement by Copyscape

Once TFS installed, the quickest way to validate it is working well is by creating a test Team project. You can use any existing templates (Agile/CMMI). Once the process is completed, try to view the Team project portal. Check SQL Reporting services for any errors.

After the intial steps are done, query the following url

1) Check the TFS Service:

Assuming localhost is my server and 8080 is the port

http://localhost:8080/services/v1.0/serverstatus.asmx

2) Check the Version control repository

http://localhost:8080/VersionControl/v1.0/repository.asmx

Both these web services call should return back with list of web methods available. This will ensure that your TFS is working on the core areas.

Page copy protected against web site content infringement by Copyscape

When you try to connect to TFS from VS 2008 after the initial setup, you may get the error message

TF31002: Unable to connect to this Team Foundation Server.

 To fix the issue, check the Project Security settings on TFS Server. You need to ensure the domain account/local account that you are using to sign to your workstation has authorization on the TFS Server.

Once you grant permissions, the access error will be fixed.

Page copy protected against web site content infringement by Copyscape

When you try to create a new migration profile in MOSS 2007 which connects to MCMS 2002, you may get a sql connection issue.

This is due to the fact that SQL Server 2000 was not set to Mixed Mode. If it uses windows authentication mode only, the migration assistant in MOSS 2007 will not be able to connect to the data source.

To change to Mixed mode, right click on the server name in SQL Enterprise Manager –> Properties and change to Mixed mode.