/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" More DataTables and joining them in Monad "," MSH Get-MSDN Function "," Getting and Working With SQL Server data in Monad "," MSH Cluster Watcher script "," Monad NewYears Clock "," Using ADO to get data from Excel to Dataset in Monad. "," Monad Really Does Rock "," Passing (not so) mandatory Parameters to WMI metho... "," Saving a WMI instance to a XML-file from MSH "," MSH Orphan share remover Tool "," ")

Friday, December 30, 2005


MSH GUI Viewer for Dataset Example

A viewer for the dataset created in former Post, More DataTables and joining them in Monad to Show the Relations in a Datagrid,

I did already show it here, WMI viewer script for MSH (GUI), but here you can see it Shows the relations created so you can walk them like this, also you can sort the Tables:

From User

To Computer :

# DataSet Viewer Example,
# $DS should already be filled
# /\/\o\/\/ 2005
# http://mow001.blogspot.com

$form = new-object "System.Windows.Forms.Form"
$form.Size = new-object System.Drawing.Size @(800,400)
$DG = new-object "System.windows.forms.DataGrid"
$DG.CaptionText = "Example for http://mow001.blogspot.com/2005/12/more-datatables-and-joining-them-in.html"
$DG.AllowSorting = $True
$DG.DataSource = $Ds.mshobject.baseobject
$DG.Dock = [System.Windows.Forms.DockStyle]::Fill

#show the Form

$form.text = "DataSet Viewer Example"
$form.topmost = $true

I think this is a nice way to look at the result of your Data combining done in Monad

If you got the data in the DataSet from different sources, don't forget you can save a dataset to XML for later use, see also : Using ADO to get data from Excel to Dataset in Monad. (If you do this for a DataTable take care that you have to save it with Schema to load it back in a DataTable Object, also you have to Name the DataTable before Saving.

Also you might want to look at the DataView Class to Filter the Data in the DataTable you would almost forget your still in a Command Shell

PS if you want to go back from computer to user just add another relation

# Add a relation back from Computer to User
# Watch out ! child / Parent Switched Using Variables Of last Post !
$rel = new-object System.Data.DataRelation("ComputerToUser",$child,$parent,$false)

Tags :

Anonymous Anonymous

I (student) am posting to let you know that think your blog is brilliant.. I adore navigating around IT as IT is very good organised and the info I require, is very easy to find..

Adware Remove
Post a Comment

<< Home


October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?