Friday, February 27, 2009

How to store XMLdocument @MSSQL 2005 as xml by using XSD

I was looking for a fast path to store XML in MSSQL 2005 by using XSD + VS2005.
For making life easier I created a stored procedure and imported it to Dataset:

I'm posting this code for other people which are looking for the fast solution:
MemoryStream xmlStream = new MemoryStream();
xmlDoc.Save(xmlStream);
SqlXml sqlXml = new SqlXml(xmlStream);
//here comes a table adaptor //
tblXYZTableAdapter xyzTableAdaptor = new tblXYZTableAdapter();
xyzTableAdaptor.SP_StoreProceure(sqlXml);

Tuesday, February 24, 2009

XSD & handling DBNull problem C#

The value for column xxx in table XXXXX is DBNull.
Recently, I started to use XSD for faster & easier object development in VS. One of obstacles which I discovered is DBNull which almost impossible to handle an exception via usual approach like . I posting this guide, because I saw many posts which propose non-trivial solutions.

I found two ways to make it easier:
1. To use try/catch mechanism, may result unnecessary slowness
2. The best: XSD class product for each object also a method for null/DBnull validation and by doing it helps to make a program in a very easy way.
Example: if objects name MyColumn so the method will be called IsMyColumnNameNull.

Thursday, February 19, 2009

EMC NPG advisor

EMC published new version on Networker Upgrade advisor. This version creates detailed step-by-step document for proper backup software upgrades

https://powerlink.emc.com/nsepn/webapps/btg548664833igtcuup4826/km/appmanager/km/secureDesktop?_nfpb=true&internalId=0b014066803d054d

Getting inventory + serials for DELL servers in OPENMANAGE

It's possible to obtain servers hw info throw Tools->Compliance tool

OpenSUSE 11.0 XDMCP enablement

As it appears, Configuring XDMCP protocol for making graphic network connections from remote X client is very tricky. I found the following article which explains, how it can be done:

Bear in mind,that 2 components should be evaluated:

1. XDMCP settings

2. Linux firewall settings

Configuring XDMCP on Linux

http://www.wmltd.co.uk/index.php/products/nomachine_thin_client/setting_up_x