Tuesday, November 23, 2004

Second one.

070-316: Developing and Implementing Windows-based Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET

This one was bit tough, may be due to the fact that i haven't used to much win forms programming. Used same old MS press, exam cram and codeclinic.com links and this time dwelved into more msdn library.

1 more to go for MCAD.net!!!

Wednesday, November 10, 2004

OpenXML - attribute centric XML

Surprsingly a sample for this one was hard to find in internet, i googled for a long time to catch a working code. The column i joined was a char and has spaces in before and i needed to keep the spaces for joining to that column, normal element centric approach will trim the spaces while preparing the document to table structure.

CREATE TABLE OpenXMLTest
(
VDR_NUM CHAR(9) PRIMARY KEY,
VDR_NAME CHAR(100)
)
GO


INSERT INTO OpenXMLTest VALUES(' 1','Contoso Inc.')
GO

CREATE PROC TestOpenXML
@in_TXML text
as
DECLARE @hDoc INT
EXEC sp_xml_preparedocument @hDoc OUTPUT, @in_TXML
SELECT A.VDR_NUM, A.VDR_NAME
FROM OpenXMLTest A,
OPENXML (@hDoc, 'ROOT/OpenXMLTest',2)
WITH(VDR_NUM CHAR (9)) OutXML
WHERE A.VDR_NUM = OutXML.VDR_NUM

//cs code

System.Text.StringBuilder sb = new System.Text.StringBuilder(1000);
XmlTextWriter xtWriter=new XmlTextWriter(new System.IO.StringWriter(sb));
xtWriter.WriteStartElement("ROOT");
xtWriter.WriteStartElement("OpenXMLTest");
xtWriter.WriteStartElement("VDR_NUM");
xtWriter.WriteCData(" 1");
xtWriter.WriteEndElement(); //for VDR_NUM
xtWriter.WriteEndElement(); //for OpenXMLTest
xtWriter.WriteEndElement(); //for ROOT

// mundane ADO.net code goes here, use sb.ToString() for Xml string

Monday, November 08, 2004

My first MCP!!!

070-315: Developing and Implementing Web Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET
Hurray. After a long long time, i decided to go for the exam and cleared it. Seemed very easy, all my asp.net experience for 2+ yrs helped a lot.

I feel MS press book was no where near the exam perparation, i used MS press, exam cram and codeclinic.com links. anybody with good asp.net experience should be able to clear the exam with less preparation.

It was good learning Globalization/Localaization and custom server controls, hadn't worked on that much prior to this exam. Should start preparing for my next exam, Windows.

Friday, November 05, 2004

A journey of a thousand miles ....



A journey of a thousand miles starts with a single step. (Chinese Proverb)

To start with,

tech-"agora" - Greek lexicon meaning, marketplace and place of public assembly.

Happy Blogging Sasi.