Sunday, May 31, 2009

Let's Talk about .. MOSS2007-SharePoint Template List

I found it from http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/721bec39-2d32-4bbc-9094-a021a0d06dcb

0 - GLOBAL (SetupPath=global) - "Global template"

1 - STS - "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"

2 - MPS - "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"

3 - CENTRALADMIN - "Central Admin Site"

4 - WIKI - "Wiki Site"

7 - BDR - "Document Center"

9 - BLOG - "Blog"

20 - SPS (OBSOLETE) - "SharePoint Portal Server Site"

21 - SPSPERS - "SharePoint Portal Server Personal Space"

22 - SPSMSITE - "Personalization Site"30 - SPSTOC (OBSOLETE) - "Contents area Template"

31 - SPSTOPIC (OBSOLETE) - "Topic area template"

32 - SPSNEWS (OBSOLETE) - "News area template"

33 - SPSNHOME (SubWebOnly) - "News Home template"

34 - SPSSITES - "Site Directory area template"

36 - SPSCOMMU (OBSOLETE) - "Community area template"

38 - SPSREPORTCENTER - "Report Center Site"

39 - CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING) - "Publishing and Team Collaboration Site"

40 - OSRV (SetupPath=SiteTemplates\OSRV) - "Shared Services Administration Site"

47 - SPSPORTAL - "Corporate Intranet Site"

50 - SRCHCEN - "Search Center"

51 - PROFILES - "Profiles"

52 - BLANKINTERNETCONTAINER - "Internet Presence Web Site"

53 - BLANKINTERNET - "Publishing Site", "Press Releases Site", "Publishing Site"

54 - SPSMSITEHOST - "My Site Host"

90 - SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE) - "Search Center Lite"

6221 - PWA (SetupPath=SiteTemplates\PWA) - "Project Web Access Site"

6215 - PWS (SetupPath=SiteTemplates\PWS) - "Project Workspace"

14483 - OFFILE - "Records Repository", "Records Repository"

Tuesday, May 19, 2009

Let's Talk about .. MOSS2007-Runtime Error without any details

Yesterday, I found a Runtime Error page instead of web site showing. A support engineer from Microsoft suggested me to modify web.config of my MOSS in C:\Inetpub\wwwroot\wss\VirtualDirectories\[YOUR_PORT] as following

-in SafeMode tag, set Attribute CallStack="True"
-in customErrors, set Attribute Mode="Off"

I found that my web.config already be set like that. Then, he checked again and found that there are 2 locations of web.config since I have 2 Server: MOSS and DB which I also set both of them as Web Front End server (by installing MOSS to both of them). Thus, two web.config(s) had to be modified. Then, I could see what the error was.

Tuesday, May 12, 2009

Let's Talk about .. MOSS2007-Back up SharePoint FULL with Scheduled Tasks

Yesterday, I was assigned to perform a back up schedule for MOSS.

The concept is full backing up for SharePoint and Site Collection backing up for each site collection.

P’Pop Wantit Tangrugsasut, senior system analyst from CS division, teached me about a concept and how to do it.


The instruction to back up Site Collection as Scheduled Task
-Create a shared folder name “ERP_MOSS_Backup”. It must be shared and added permission to write the files to the Admin account.
-Write a script at the Database server for creating folder.

[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

F:

cd "Moss_Backup"

mkdir "Moss_Backup_%mydate%"

-Save it at that Folder
-Set the Scheduled Task for the script by this instruction http://natttech.blogspot.com/2009/05/lets-talk-about-windows-server-2003.html
-Write a script to Back up MOSS (FULL)

[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

c:

cd "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"


STSADM.exe -o backup -directory \\[SERVER_NAME]\[FOLDER_NAME]\Moss_Backup_%mydate% -backupmethod full

Where [SERVER_NAME] is your server name to put the backup files there
And [FOLDER_NAME] is your folder you wanna put the backup files

-Or Write a script to Back up Site Collection MOSS
[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

c:


cd "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"


stsadm.exe -o backup -url http://[MOSSWebApp]/Sites/[SiteCollection_NAME] -filename "\\[SERVER_NAME]\[FOLDER_NAME]\Moss_Backup_%mydate%\[FILE_NAME].dat" –overwrite

Where [SERVER_NAME] is your server name to put the backup files there
And [FOLDER_NAME] is your folder you wanna put the backup files
And [FILE_NAME] is your backup file name



Let's Talk about .. Windows Server 2003-Scheduled Task

Today, P’Pop Wantit Tangrugsasut teached me about how to set the Scheduled Task in Windows Server.

The instruction to set Scheduled Task
-Go to Start->Control Panel->Scheduled Tasks -Double Click at Add Scheduled Task
-Click Next button
-Click Browse
-Select your script file’s location
-Select Perform this task, for me, I chose Weekly
-Click Next button
-Set the Start time:, Every weeks, and Select the day(s)
-Click Next button
-Enter the user name and password
-Click Next button
-Click Finish button
-For best practice, enter your task again, and go to Settings tab. -Set the Stop the task if it runs for XX hour(s) XX minute(s) as your suitable time.

Friday, April 24, 2009

Let's Talk about .. MOSS2007-Content Type

Yesterday, I joined the wrap up day of my division meeting with Mr.Chatree, counsult from Microsoft. He talked about Content Type of MOSS2007 that make me understand clearer about it.

The content type is like a group of metadata that are separated via the type of documents. The content type can be used with any (Document Library of) site if it is located at the top level site.

Tuesday, March 31, 2009

Let's Talk about .. MOSS2007&Reporting Service-Error The request failed with HTTP status 401 : Unauthorized


After I managed integration settings and granted database access, I clicked at Set server defaults in Reporting Services of Application Management. Then, I got an error page "An unexpected error occured while connection to the report server. Verify that the report server is available and configured for SharePoint integrated mode. -> Server was unable to process request. ---> The request failed with HTTP status 401 : Unauthorized" as shown in the figure.
After I managed integration settings and granted database access, I clicked at Set server defaults in Reporting Services of Application Management. Then, I got an error page "An unexpected error occured while connection to the report server. Verify that the report server is available and configured for SharePoint integrated mode. -> Server was unable to process request. ---> The request failed with HTTP status 401 : Unauthorized" as shown in the figure.
We discussed and connected live meeting with a support engineer from Microsoft. He said that the cause was the authentication mode of ReportServer host website. The way he used to solve this problem was running the command
[CMD]
cd c:\Inetpub\Adminscriptscscript adsutil.vbs set w3svc\c:\Inetpub\Adminscrpts cscript
cd C:\Inetpub\Adminscripts cscript adsutil.vbs set w3svc/XXXXXXXXX/root/NTAuthenticationProviders "NTLM“cscript adsutil.vbs set w3svc/XXXXXXXXX/NTAuthenticationProviders "NTLM"
where XXXXXXXXX is the identifier of the ReportServer host website.

Sunday, March 15, 2009

Let's Talk about .. SQL Server 2005 & 2008

Last Thursday, I participated the meeting of MS SQL Server 2008 Presentation by Mr.Nicolas and Mr.Jason , engineers from Microsoft.


Because my office member have started using Reporting Services in our systems, thus we would like to discuss about it and the problems we found.


The first one they suggested is "Scale Out". They recommended us to use many report servers to point to the report catalog.


The important one they suggested us to use was Report Catalog. The Report Catalog consists of Reporting Services Database (RSDB) and Reporting Services Tempolary Database (RSTempDB). It has a lot of I/O of transaction.


1.RSDB stores the report's metadata, including snapshots. It is long living, thus it should be backed up.
2.RSTempDB stores tempolary snapshot while running reports. It is highly volatile. And since its volatile, we need the report lifetime policy of data by setting session timeout value (10 min): Clean up Cycle Minutes guides background clean up thread.



Then, how different between RS2005 and RS2008.
For RS2005,


-Many insert to Chunk Data

-Many insert to Snapshot Data

-Many insert to Session Data Table

For RS2008,

-Many insert to Segment; take majority of transation of RSTempDB


Some trip to optimize the Report Performance

-Remove the unnecessary columns

-Bring rendered report to user, for example, doc, pdf, etc.


They showed us the new tool, MS SQL Server 2008 Report Builder. It looks like MS Office 2007 Application because of its theme. In the future, users can design and use the reports themselves. I asked them if there are any features that we still need Visual Studio 2008 to develop the report. They answered me that the Report Builder can do anything VS2008 can except debugging and creating and using several data sources.

Friday, February 27, 2009

Let's Talk about .. Security

Last Wednesday I joined the meeting of my department. One of many parts was about security. Mr Sahassawat from AC InfoTech described about the security to us.

The reason that the organization needs security policy consists of to protect the organization, protect business and employees, set the rules for expected behavior- the prohibited activities, be used for authorize activities, be used for approved operational steps, and legal compliance.

Policy is a part of security the global standard of security is ISO27001 (Global Standard Code of Protection for information security management). Now Thailand has 20 certificates of this ISO.

Policy can declare the direction of the organization and policy is an intelligent property of the organization.

Wednesday, February 18, 2009

Let's Talk about .. IIS-IP Address and domain name restrictions

For more security, Forbes, SM Team, told me the way to set the IP address and domain name restrictions. By setting it, we can specify who can access the WebSite or Web Service.

The instruction to set IP Address and domain name restrictions

-Open IIS
-Right click at you web sites

-In Directory tab, click at Edit button

-Select Granted access or Denied access as the default, then you can specify for the exception case.

For example, if I want only the website on ServerA to call Web Service on Server B, then I select Denied access and Except for Server A.

Let's Talk about .. Windows Server 2003-Create Local Users and Groups

Yesterday, Forbes, SM Team Analyst, teached me how to create the local users and groups since the method of my Web Service needs to check authorize of the user before performing the operation.

The instruction to create Local Users and Groups
For Local Users:

-Go to Start->All Programs->Administrative Tools->Computer Management
-Expand Local Users and Groups -Right click at Users
-Clickt at New User
-Type User name

Note that this user can be the user domain from Active Directory or Local User of this machine
-Type Full name
-Type Description
-Type Password
-Type Confirm
-Select Password never expires, if any
-Click Create button
-Click Close button

For Local Group:

-Right Click at Groups
-Click New Group
-Type Group name
-Type Description
-Click Add button
-Add user
-Click Check Names
-Click OK button
-Click Create button
-Click Close button

Monday, February 16, 2009

Let's Talk about .. MOSS-Error "You do not habe the rights to perform this operation" when setting SSO

A few week ago, I got the error "You do no have rights to perform this operation" message when I tried to manage the Single Sign-On setting on MOSS2007. I asked P'Knight DBA and P'Pop DBA to check if the rights of the user account I used is a member of public database in the configuration database and it's the member of serveradmin fixed server role in the instance of MS SQL Server or not, and it is. Thus, I opened a case to Microsoft. Microsoft Support Engineer suggested me to check the Single Sign-On service logon account in Windows Server 2003 service. And I found that why the error occured. My Single Sign-on Service logon account was set as Local System. It has to be set as the correct domain account that I use with MOSS.

With the help of Microsoft and the idea from SharePoint 2003 article http://support.microsoft.com/kb/889645 , it may concluded that we have to make sure that the user account we're gonna use to set the SSO must be..

  1. Log On As in Microsoft Single Sign-On Service in Windows Server 2003
  2. Member of Administrator/Local group of MOSS2007
  3. Member of public database role on the config database
  4. Member of serveradmin fixed server role in the instance of SQL Server that SSO DB is gonna be located

Friday, February 6, 2009

Let's Talk about .. MOSS2007-Find MOSS Version

Sometimes you may forgot what version of MOSS you have and what the latest version of MOSS you installed. I found the way to check it from Penny on Sharepoint http://www.mindsharpblogs.com/penny/articles/481.aspx

Note: Check Deploy Software Updates for MOSS2007 at http://technet.microsoft.com/en-us/library/cc263467.aspx

The instruction to find the latest update package/hotfix of MOSS
-Go to Central Administrator
-Go to Home tab
-In Farm Topology, click at your MOSS Server
-Click at Site Actions
-Click at Site Settings
-You can see Site Information which shows the version. (I found it from Penny on SharePoint)

  • 12.0.0.6327 : MOSS2007 Cumulative update
  • 12.0.0.6318 : MOSS2007 Infrastructure Update
  • 12.0.0.6303 : MOSS2007 Post-SP1 Hotfix
  • 12.0.0.6301 : MOSS2007 Post-SP1 Hotfix
  • 12.0.0.6300 : MOSS2007 Post-SP1 Hotfix
  • 12.0.0.6219 : MOSS2007 SP1
The instruction to find the Service Pack version of MOSS
-Go to Start->Control Panel->Add or Remove Programs
-Find Microsoft Office SharePoint Server 2007
-Click at Click here for support link
-The Support Information windows will appear. Then, you can see the version of your MOSS. After that, you can check that number with this table where I found it at Penny on Sharepoint.

  • 12.0.6303.5000 : post-SP1 hotfix
  • 12.0.6219.1000 : SP1

Tuesday, February 3, 2009

Let's Talk about .. Java Script-Convert to n-decimal-point number

If you want to set your number to be n-decimal-point number, you can use toFixed(n) function. I fount this methos in http://www.mredkj.com/javascript/nfbasic2.html For example,

[Java Script]
//Input: 1234 or 123.4
//Output: 1234.00 or 123.40
yourNumber = num.toFixed(2);

Let's Talk about .. MOSS2007-Install SQL Server Reporting Services Add-in

Today I just updated version of SQL Server Reporting Services Add-in for SharePoint Technologies




The instruction to install the SQL Server Reporting Services Add-in

-Make sure you already installed Service Pack 3 of SQL Server 2005

-First I downloaded the add-in from
http://www.microsoft.com/downloads/details.aspx?FamilyID=0acb75a6-7c1d-4e2b-af69-7e5f9ecad299&displaylang=en).

NOTE: Check whether your MOSS runs on 32 or 64 bit server

-Install it

-RestartIIS


-Run SharePoint Products and technologies Configuration Wizard

(Start->All Programs->Microsoft Office Server->SharePoint Products and Technologies Configuration Wizard)

-Enter Central Administrator

-Go to Application Management tab

-Go to Reporting Services->Manage integration settings

-Set Report Server Web Service URL

-Set the Authentication Mode, for me, I selected Trusted Account

-Click OK button

-Go to Reporting Services->Grant database access

-Specify Server Name and name instance, if any

-Click OK button

-Go to Reporting Services->Set server defaults

-If anything is ok, you should be able to see the detail of this page

Thursday, January 29, 2009

Let's Talk about .. Visual Studio 2005-Web Services Enhancements 3.0

Today I participated a mini course of Web Services Enhancements (WSE) 3.0, instructed by Dr. Gorn Tepvorachai and Mr.Suppakrit Forbes Chatchayanusorn from Standards & Methodology Team, IT Department, BOT.


Since I have to develop the web services that return some credential results, WSE 3.0 is the solution they suggested me.

The basic concept of WSE 3.0 is there is a connection between web site and web service that makes it unable to be called directly via URL.

The instruction to Declare Security and Policy by WSE 3.0

NOTE: Make sure that you already installed WSE3.0 (runtime) to your server both WebSite and Web Service and WSE3.0 (Visual Studio Developer) on your developing machine.

At WebService Side:



-Check Your Web Service comes from New Web Site->ASP.NET Web Service

-Install WSE 3.0

-Open Solution of VS2005

- Check out the project of Web Service

-Right click at the project of Web Service

-Click WSE Settings 3.0 (at the buttom)

-In General tab, check Enable the project for Web Services Enhancements

-Check Enable Microsoft Web Services Enhancements Soap Protocol Factory

-In Diasnostics tab, Check Enable Message Trace

-Click OK button

-Check your web.config, is it added section tag with microsoft.web.services3

-Deploy your Web Service


-Try to call your web service via web browser (optional)

At WebSite:

-Check your Web Site project

-Right Click at WebSite project

-Click at WSE Settings 3.0

-In General tab, check Enable the project for Web Services Enhancement

-Update your web service


-Rebuild your project


-Test that your web is still able to call your web service


- If ok, now it's a step to set the policy.


At WebService Side:

-Right click at web service project

-Click at WSE Settings 3.0

-In Policy tab, check Enable Policy

-Click Add button

-Type your Policy Name

-Click OK

-Click Next

-Do you want to secure a service or a client?, Select Secure a service application

-Choose Client Authentication Method, for me I choose Username

-Click Next

-Click Next

-Uncheck Establish Secure Session

-Click Next

-Click Select Certificate button, if any

-Click Next

-The summary message appears, click Finish

-Now you will get [yourPolycy]Cache.config file

-Open your dot vb file of Web Service

-Under WebServiceBinding tag, add Policy tag => //Policy("YourPolicyName")> _

At WebSite:

-Right click at you project

-Click at WSE Settings 3.0

-In Policy tab, enable policy

-Add Policy

-Click OK button

-Click Next button

-Select Secure a client application

-Select authentication mode, for me I use username

-Click Next button

-Enable Perform Authorization

-Add User or Add Role
Note: if you want to use the local user or local group as the role you can see the instruction at
http://natttech.blogspot.com/2009/02/lets-talk-about-windows-server-2003.html

-Uncheck the Establish Secure Session

-Click Next button

-Select Certificate, if any

-Click Finish button

-Click OK button

-Open you dot vb file that call the Web Service

-Modify it, for example, this is my old one before modification,
[VB.Net]
Dim ServiceGetResult As New MyWeb.Business.GetResult.NATTService

change to

[VB.Net]
Dim ServiceGetResult As New MyWeb.Business.GetResult.NATTService
ServiceGetResult.SetClientCredential(Of UsernameToken)(New UsernameToken("NATTusername", "NATTpassword", PasswordOption.SendHashed))
'NATTusername and NATTpassword are your username and password.
ServiceGetResult.SetPolicy("NATT Client Policy")
'NATT Client Policy is my WebSite Policy name.
hidResult.Value = ServiceGetResult.GetResultByID(txtID.Text)

At Web Service:
Because I want to check the role of user/Web Site that call the method of my web service, so I have to add the authorize function to my web service code.
-Open your dot vb file of your web service

-Add imports System.Security.Principal

-Add imports Microsoft.Web.Services3.Security.Tokens

-Add Authorization() function
[VB.Net]

Private Sub Authorization(ByVal inputRole As String)
Dim pPrincipal As IPrincipal = RequestSoapContext.Current.Credentials.UltimateReceiver.GetClientToken(Of UsernameToken)().Principal
If Not pPrincipal Is Nothing And p.IsInRole(role) Then
Return
Else
Throw New SoapException("Access denied.", New XmlQualifiedName("Authorization"))
End If
End Sub

-Add Authorization("YourRoleName") inside your method before doing anything
Note that YourRoleName is the username or role name that you specified in WSE setting.

-Deploy your web service

At WebSite:

-Update your Web Service

Now only the user or member of role group that you specified will be juct a group that can use that method of your web service.

Monday, January 26, 2009

Let's Talk about .. Visual Studio 2005-Bind DropDownList when another DropDownList changed in Repeater

P'Beer teached me last week about how to create the drop down list B that will be binded only when drop down list A's index is changed, for the case that A and B are drop down lists in the repeater.

The Instruction to Bind DropDownList when another DropDownList changed in Repeater

-add these tags for AJAX Update Panel

[HTML]
//asp:ScriptManager ID="ScriptManager1" runat="server">
/ /asp:ScriptManager>
//asp:UpdatePanel ID="UpdatePanel1" runat="server">
"

[..your table/tr/td..]

// /ContentTemplate>
// /asp:UpdatePanel>

-Add drop down list tags

[HTML]
Drop Down List A
Drop Down List B

-In the code behind, in Sub of Repeater_ItemDataBound, bind the drop down list A by adding the following lines.

[VB.Net]
If e.Item.DataItem.A_Code <> "" Or e.Item.DataItem.A_Code IsNot Nothing Then

ddlA.SelectedValue = e.Item.DataItem.A_Code

Else
'Bind DropDownList A
ddlA.DataTextField = "Ar_Name"
ddlA.DataValueField = "A_Code"
ddlA.DataSource = (New [YourNameSpace].[YourEntity].[ABus]).GetAll_ListA()
ddlA.DataBind()
ddlA.Items.Insert(0, "") 'if you don't wanna show the first choice.

End If

-Add the event for drop down list A's seelcted index changed.

[VB.Net]
#Region " DropDown Event "
Public Sub ddlA_SelectedIndexChanged(ByVal Sender As Object, ByVal e As System.EventArgs)
Dim x As String = CType(Sender, DropDownList).ClientID


For i As Integer = 0 To Me.repMain.Items.Count - 1


Dim ddlA As DropDownList = Me.repMain.Items(i).FindControl("ddlA")
If ddlA.ClientID = x Then
Dim ddlB As DropDownList = Me.repMain.Items(i).FindControl("ddlB")
'Bind DropDownList B
ddlB.DataTextField = "B_Name"
ddlB.DataValueField = "B_Code"
ddlB.DataSource = (New [YourNameSapce].[YourEntity].[YourBus]).Get_List_B_By_A_Code(ddlA.SelectedValue)
ddlB.DataBind()
End If
Next
End Sub

#End Region

Sunday, January 25, 2009

Let's Talk about .. Windows Server 2003-Start MS Single Sign-On Service

There are 2 methods to start Single Sign-On services for windows server 2003. The first method P'Pop bot-it told me and the second one I found it from http://hilfiger1014.spaces.live.com/Blog/cns!B5605D7C2A738C3D!498.entry

The instruction to start MS Single Sign-On Service

The First Method:
-Go to Start->All Programs->Administrative Tools->Services
-Right click at Microsoft Single Sign-On Service
-Click Start
The Second Method:
-Go to Command Line
-Type "net start ssosrv"

Saturday, January 10, 2009

Let's Talk about .. MOSS2007-Backup & Restore Site Collection

The best practical way to backup and restore site collection is using the command line. We use stsadm command for both backup and restore. To backup the site collection into .dat file, we use stsadm.exe -o backup -url [your Site Collection url] -filename [Backup filename with location url] For example,


[cmd]

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\"stsadm.exe -o backup -url http://NATTServer/sites/NattSite -filename f:\backup\nattsite.dat



And we use stsadm.exe -o restore -url [your Site Collection url] -filename [Backup filename with location] For example,


[cmd]
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\"stsadm.exe -o restore -url
http://NATTServer/sites/NattSite -filename F:\backup\nattsite.dat


Note: we can backup site collection from one server to restore it at another site collection.
Moreover, we can add -overwrite to both -backup and -restore command, however, it's not recommended to overwrite the site collection when you restore it since some incorrect things may occur. It's the suggestion from P'Chatree from Microsoft. Thus, you should delete site collection before restoring the site collection.


The instruction to delete site collection


-Enter Central Administration

-Click Application Management tab

-Click SharePoint Site Management->Delete site collection
-Click at No selection

-Click Change Site Collection
-Select the site collection you wanna delete

-Click OK button

-Click Delete button

-Click OK button to confirm to delete

Let's Talk about .. Visual Studio 2005-Change XML Node to DataSet

Yesterday, P'Tarn guided me how to change the XML Node to DataSet. Anyway, this way is for only the case of fixed node(s).

[VB.Net]
Dim retXmlNode As XmlNode
retXmlNode = objOutInfo.WebServiceGetInfo(InputData)
Dim retDataSet As New DataSet()
row = retTab.NewRow()
'Check that node1 for row1 is exist.
If Not (retXmlNode.SelectSingleNode("/EntityName/NodeName1") Is Nothing) Then
row("RowNameOfDataSet1") = retXmlNode.SelectSingleNode("/EntityName/NodeName1").InnerXml
End If
'Check that node2 for row2 is exist.
If Not (retXmlNode.SelectSingleNode("/EntityName/NodeName2") Is Nothing) Then
row("RowNameOfDataSet2") = retXmlNode.SelectSingleNode("/EntityName/NodeName2").InnerXml
End If
retTab.Rows.Add(row)
retDataSet.Tables.Add(retTab)
'Now you can do .. return retDataSet