DCSIMG
Adlai Maschiach

Adlai Maschiach

" You have to show in order to be seen "

News

Favorite Links

news

CardSpace

Books

Other InfoCards Proj

Virtual Earth

WSS / Sharepoint

SOA , Biztalk & ESB

CLR / .NET

TSQL: Concatenate Column from Multiple Rows into String

Ok , So I had a problem related to concatenation of a single Column into one ( same ) column when using GROUP BY .
The Problem came from a Reporting Services perspective and there might be other solutions ( like coding in VB.NET in the report )

I have found a very nice samples :

Option 1:

use Northwind

declare @CategoryList varchar(1000)
set @CategoryList =''
select @CategoryList = @CategoryList + ' , ' + CategoryName from Categories

select 'Results = ' + @CategoryList

Option 2:

use Northwind

declare @CategoryList varchar(1000)
select @CategoryList = coalesce(@CategoryList + ', ', '') + CategoryName from Categories

select 'Results = ' + @CategoryList

In the end I used option 2 as part of a UserDefiendFunction .

The manipulation was that the of the “GROUP BY” was sent to the UDF to use in it’s select “where” , so it could return the filtered row concatenated. And that UDF was called as part of the grand SELECT.

NOTE: this is a developer solution , a DBA might have a better solution ;)

SharePoint 2010 : The following computer running SharePoint does not contain the required Infopath form template

What can I say … except "elementary my dear Watson" ;)

Ok , the problem is that you didn’t activate a feature in the site you’re working with :P

go to : Site Actions > Site Settings > Manage Site Features > Team Collaboration Lists.

The problem :

Untitled

The solution:

Untitled2

Untitled3

Untitled4

( Personal Note: I know it has been a while , but once in a while doesn’t hurt ;)  )

T-SQL Israeli CardID Checker / ת.ז. ישראלית

T-SQL Israeli CardID Checker / ת.ז. ישראלית

Once in a while I come across code that I didn’t fins in the internet … mainly because it’s for local use ;)
This is one of these times :)

This code is the T-SQL version of the algorithm  that checks the given Israeli CardID , and adds a leading Zero , if need one ( like in my personal case ) , and calculates the “Check Number” ( SIFRAT BIKORET ) , if it’s missing.

I needed this for an SSIS Package that loaded monthly information needed for my SharePoint Content ;)

BTW , there might be a better way to code this , but i’m no T-SQL expert :)

/*
Algorithm From
http://halemo.net/info/idcard/index.html
*/

ALTER FUNCTION [dbo].[fn_FixUpCardID]
    (
    @CardID VARCHAR(50)
    )
RETURNS VARCHAR(50)
AS
    BEGIN
    DECLARE @CardID_1 INT
    DECLARE @CardID_2 INT   
    DECLARE @CardID_3 INT
    DECLARE @CardID_4 INT
    DECLARE @CardID_5 INT
    DECLARE @CardID_6 INT
    DECLARE @CardID_7 INT
    DECLARE @CardID_8 INT
    DECLARE @CardID_9 INT
    DECLARE @CardID_1_CalcVal INT
    DECLARE @CardID_2_CalcVal INT   
    DECLARE @CardID_3_CalcVal INT
    DECLARE @CardID_4_CalcVal INT
    DECLARE @CardID_5_CalcVal INT
    DECLARE @CardID_6_CalcVal INT
    DECLARE @CardID_7_CalcVal INT
    DECLARE @CardID_8_CalcVal INT
    DECLARE @CardID_9_CalcVal INT
    DECLARE @CardID_TotalValue INT
    DECLARE @CardID_Decimal INT
    IF (LEN(@CardID) = 7)
    BEGIN
       SET @CardID = '0' + @CardID;
    END
    SET @CardID_1 = CAST(SUBSTRING(@CardID,1,1) AS INT)
    SET @CardID_2 = CAST(SUBSTRING(@CardID,2,1) AS INT)
    SET @CardID_3 = CAST(SUBSTRING(@CardID,3,1) AS INT)
    SET @CardID_4 = CAST(SUBSTRING(@CardID,4,1) AS INT)
    SET @CardID_5 = CAST(SUBSTRING(@CardID,5,1) AS INT)
    SET @CardID_6 = CAST(SUBSTRING(@CardID,6,1) AS INT)
    SET @CardID_7 = CAST(SUBSTRING(@CardID,7,1) AS INT)
    SET @CardID_8 = CAST(SUBSTRING(@CardID,8,1) AS INT)
    if (LEN(@CardID) = 9)
    BEGIN
        SET @CardID_9 = CAST(SUBSTRING(@CardID,9,1) AS INT)
    END
    ELSE
    BEGIN
        SET @CardID_9 = -1
    END
    SET @CardID_1_CalcVal = (@CardID_1 * 1) / 10 + (@CardID_1 * 1) % 10
    SET @CardID_2_CalcVal =    (@CardID_2 * 2) / 10 + (@CardID_2 * 2) % 10
    SET @CardID_3_CalcVal = (@CardID_3 * 1) / 10 + (@CardID_3 * 1) % 10
    SET @CardID_4_CalcVal = (@CardID_4 * 2) / 10 + (@CardID_4 * 2) % 10
    SET @CardID_5_CalcVal = (@CardID_5 * 1) / 10 + (@CardID_5 * 1) % 10
    SET @CardID_6_CalcVal = (@CardID_6 * 2) / 10 + (@CardID_6 * 2) % 10
    SET @CardID_7_CalcVal = (@CardID_7 * 1) / 10 + (@CardID_7 * 1) % 10
    SET @CardID_8_CalcVal = (@CardID_8 * 2) / 10 + (@CardID_8 * 2) % 10
    SET @CardID_TotalValue = @CardID_1_CalcVal + @CardID_2_CalcVal +
                             @CardID_3_CalcVal + @CardID_4_CalcVal +
                             @CardID_5_CalcVal + @CardID_6_CalcVal +
                             @CardID_7_CalcVal + @CardID_8_CalcVal
    IF (@CardID_9 > -1)
    BEGIN
        SET @CardID_9_CalcVal = (@CardID_9 * 1) / 10 + (@CardID_9 * 1) % 10
         IF (((@CardID_TotalValue + @CardID_9_CalcVal) % 10) != 0)
                 SET @CardID = ''
    END
    ELSE
    BEGIN
        if ((@CardID_TotalValue % 10) = 0)
        BEGIN
            SET @CardID = @CardID + '0'
        END
        ELSE
        BEGIN
            SET @CardID_9 = (((@CardID_TotalValue / 10) + 1) * 10) - @CardID_TotalValue
             SET @CardID = @CardID + CAST(@CardID_9 AS CHAR)
        END
       -- SET @CardID = cast((((@CardID_TotalValue % 10) + 1) * 10) as varchar)
    END
    RETURN @CardID 
    END

BizTalk 2010 Beta 1 & AppFabric RC

BizTalk 2010 Beta 1 & AppFabric RC

On the 20th , BizTalk 2010 Beta 1 was released ,  a day after the AppFabric RC.

We all know ( at least a bit ) about BizTalk , but regardless we shouldn’t disregard the Windows Server AppFabric which is a set of integrated technologies that make it easier to build, scale and manage Web and composite applications that run on IIS. Windows Server AppFabric targets applications built using ASP.NET, Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF).

It provides out-of-the-box capabilities for you to easily build and manage composite applications, including:

  • Enhanced design and development tools in Visual Studio to build rich composite applications
  • Management and monitoring of services and workflows via integration with IIS Manager and Windows PowerShell
  • Distributed in-memory application cache to improve application performance

If we’ll go to the Download of the Windows Server AppFabric RC , we’ll see that the file is 41.4 MB ( for each CPU version ) , which only makes you wonder if by SP2 of SharePoint 2010 , we won’t expect to have an integration between the both ( SPS2010 & AppFabric ) !

I know that the SPTeam said that they don’t expect that the SPS2010 will have support to WF 4 , but that doesn't mean it won’t integrate with something that does OR have a change of heart and add it like WCF & WF was supported in BT2006R2 ( as an AddOn )

Any way , the download of BT2010B1 is here , and here it is : BizTalk Server 2010 Beta

Ohh ,yeh , one more thing , it would have integration with the new Visual Studio 2010 ;) [ Like dahh :) ]

Visual Studio 2010 - The type or namespace name 'MyClassLibrary' could not be found

Visual Studio 2010 - The type or namespace name 'MyClassLibrary' could not be found

I have run across this message in the Beta Edition of Visual Studio 2010 , and I dismissed it as a Beta feature . But now with the release version , for me , that message was a bit out of place .

It seems that the solution , as far as I’m concern , is very simple , change the Target to “.NET Framework 4” and everything is going back to normal.

VS2010 

If you’ll look closely , you’d notice that the default is set to “.NET Framework 4 Client Profile”

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.

If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile. Instead you must target the .NET Framework 4. For more information, see Troubleshooting .NET Framework Targeting Errors.

Express 2010 RTM Download summary

Express 2010 RTM Download summary

Any one who really knows me , knows that my 2nd passion is the Express toolset :)

Now, that Visual Studio 2010 has RTM-ed a few days (weeks) a go I have decided to build a small collection of relevant URLs :

from http://www.microsoft.com/express/Downloads/

And the SqlServer Express 2008 R2 – with the new 10GB support :)

Here is the part of the SqlServer 2008 R2 FAQ :

  • Is the database size limit increased in all editions of SQL Server 2008 R2 Express?
    Yes, SQL Server 2008 R2 Express with Tools and SQL Server 2008 R2 Express with Advanced Services will allow 10GB databases as well.
  • What about CPU and memory limits? Are any other limits changed in SQL Server 2008 R2 Express?
    No, the database size limit is the only limit we updated in SQL Server 2008 R2 Express.  SQL Server 2008 R2 Express is still limited to 1 CPU and 1 MB or RAM.
  • Was the database size limit changed for previous versions of SQL Server Express?
    No, the database size limit in previous versions of SQL Server Express (including SQL Server 2005 Express and SQL Server 2008 Express) stays unchanged at 4GB.

BTW : International R2 Express download options will be available in May 2010

"How Do I" Videos SharePoint Development with Visual Studio 2010

"How Do I" Videos SharePoint Development with Visual Studio 2010

This reminds me of an old post I did .. Moss 2007 and Designer Webcast How-To is growing , and a few more like SharePoint Developer Training and Webcast Series: SharePoint for Developers and … but that’s ancient history ,and it’s Moss2007. Now, we start to talk about SharePoint 2010 !

So, here’s a small and growing list :

which comes from How Do I Videos for Office Developers ( Office Developer Center > Learn >  How Do I Videos )

For those who are still looking for Moss2007 Videos , here’s a link :
How Do I Videos for SharePoint Server

Office 2010 RTM !

Office 2010 RTM !

Long time waited Office 2010 has finally RTM-ed.

I know that some of use played around with the Office 2010 on the developer's side .. and some of use on the user/client side . So this news is what most of us have been waiting for a long time :)

For me , this news come from the Microsoft Office 2010 Engineering blog - Office 2010 Reaches RTM!

Specification .. knowing you , I guess you know already – the main thing is that now it’s RTM , so more reliable and stable :)

Hope to start posting more about the Office System 2010 as a complete and versatile solution to most of your problems ( except making coffee )

SharePoint 2010 is just around the corner

SharePoint 2010 training material released in January:

Information Worker 2010 (beta) Demo VM

Information Worker 2010 (beta) Demo VM

The download link is here

Overview

This download contains a two Virtual Machine set for evaluating and demonstrating Office 2010 and SharePoint 2010. Virtual machine “a” contains the following pre-configured software:

  1. Windows Server 2008 SP2 Standard Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS
  2. Microsoft SQL Server 2008 SP1 + CU2 Enterprise Edition with Analysis, Notification, and Reporting Services
  3. Microsoft Office Communication Server 2007 R2
  4. Visual Studio 2010 Beta 2 Ultimate Edition
  5. Microsoft SharePoint Server 2010 Enterprise Edition Beta 2
  6. Microsoft Office Web Applications Beta 2
  7. FAST Search for SharePoint 2010 Beta 2
  8. Microsoft Project Server 2010 Beta 2
  9. Microsoft Office 2010 Beta 2
  10. Microsoft Office Communicator 2007 R2 Virtual machine “b” contains the following pre-configured software:
    1. Windows Server 2008 R2 Standard Evaluation Edition x64, joined to the “CONTOSO.COM” domain
    2. Microsoft Exchange Server 2010 Active directory has been preconfigured over 200 “demo” users with metadata in an organizational structure.
      All of these user profiles have been imported and indexed for search within SharePoint Server 2010, with “contoso\administrator” granted administrator permissions.
      SharePoint Server 2010 has been configured in a “Complete” farm using Kerberos authentication and the default SQL Server 2008 instance for data, and has a site collection created using the Team Site template at http://intranet.contoso.com/ and a FAST Search Center at http://intranet.contoso.com/search/.
      Performance Considerations:
      • If possible, unpack and run the VM image on a separate, fast hard drive (7200 RPM or better) from the operating system of the host machine. If this is being done on a laptop, a second internal drive or external eSATA drive works best, though USB 2.0 (make sure it's 2.0, 1.1 is too slow) or Firewire is acceptable. For absolute best performance use a second internal SSD drive. Passwords for all users in the CONTOSO AD are "pass@word1" (remove quotes) (including the Administrator account).

 

Instructions

  1. Start Hyper-V Manager from Control Panel -> Administrative Tools
  2. Confirm that the local host machine appears in the Hyper-V Manager list and select it if not already done
  3. Under Actions, click Virtual Network Manager.
  4. Confirm that you have created an Internal virtual network named “Internal”. Internal networks limit connectivity to only VMs and the host. If a suitable not, create one now using the following steps:
    1. Click on Virtual Network Manager in the Actions pane
    2. Choose New virtual network in the Virtual Networks pane
    3. Choose Internal from the type list and click Add
    4. Enter a name of Internal and click OK v. Start menu -> right-click Network –> Properties
    5. Click Change adapter settings
    6. Find the adapter with a description of Internal, right-click and choose Properties
    7. Double-click on Internet Protocol Version 4 and enter the following values:
      1. IP address: 192.168.150.6
      2. Subnet mask: 255.255.255.0
      3. Default gateway: (leave blank)
      4. Preferred DNS server: 192.168.150.1
    8. Click OK
  5. Close the Virtual Network Manager dialog.

 

  1. Under Actions, click Import Virtual Machine
  2. Use the Browse button to select the folder where the virtual machine package was extracted. Do not check
  3. Click Import and wait for the Import to complete – the import status will appear in the Operations column
  4. Select the newly imported virtual machine and click Settings in the right pane of the Hyper-V Manager
  5. Confirm (and correct if necessary) that the Network Adapter is connected to the Internal network from step 1d.
  6. Close the virtual machine Settings dialog.

Office 2010 & SharePoint 2010 Beta Release

Office 2010 & SharePoint 2010 Beta Release

Well, now it available for you to download :)

Office 2010

All you want to start learning about the Office 2010 is here:

while connect users got this version on the 16th, just a few days a go ;)

SharePoint 2010, Some new links

SharePoint 2010, Some new links

Wss 4.0 = SharePoint Foundation 2010

SharePoint Foundation 2010

Do you remember the previous post Office 2010 / Wss4 / Moss2010 Technical Preview

Wss4

well this is a screen shot of the ALL BRAND NEW “Build 4514 - SharePoint Services” Install Splash Screen :D

After playing a bit with the previous version , we are ready for some basic WSS style screen casts :)

SharePoint 2010 (Beta) Developer Center

SharePoint 2010 (Beta) Developer Center

Although the new Developer Center is out SharePoint 2010 (Beta) Developer Center.
( because of the Microsoft SharePoint Conference 2009 )

… and the new name for WSS ( Windows SharePoint Services ) would be SharePoint Foundation 2010 (Beta)

I still haven’t found an official “you can download a trial” edition of the Beta edition SharePoint Server 2010 (Beta) :’(

( I know I have one , but this is for all of you who want it too )

Any way , you have this for now :

Visual Studio 2010 Beta2

Visual Studio 2010 Beta2 is out

VisualStudio2010beta2

Needless to say that the New Logo

VisualStudio2010beta2_1

Relates to the new Logo the .NET Framework got ;)

( cross post New times = .NET New logo (!))

Just , the only thing that’s missing is an Express Version of all of this :’(

UPDATE: My mistake ! there is one , here’s the link to the ISO Download Visual Studio 2010 Beta 2 ( it’s 736 MB)

More Posts Next page »