Volume 2 Issue 2
Tena Koutou Katoa,
Still catching up on stuff I did last month. It’s been hectic at work, so taking a breather to document it all seems good to me.
This is where I continue the saga of documenting my learnings from actually putting a web site “out in the wild” (I usually code within a nice, safe, Intranet).
In February I learned how to upload documents to a database, without having to upload the file to the server first.
1: Protected Sub Submit_Click(ByVal sender As Object, _
2: ByVal e As System.EventArgs) _
3: Handles Submit.Click
4: If Page.IsValid() Then
6: End If
7: End Sub
9: Protected Sub DocumentLogic_Inserting( _
10: ByVal sender As Object, _
11: ByVal e As ObjectDataSourceMethodEventArgs) _
12: Handles DocumentLogic.Inserting
14: Dim iod As IOrderedDictionary = e.InputParameters
15: iod("documentName") = TitleTextBox.Text
16: iod("attachment") = FileUpload1.PostedFile.InputStream
17: iod("documentType") = FileUpload1.PostedFile.ContentType
18: iod("userName") = AppState.UserName
19: End Sub
Then, the business layer looks like this:
2: System.ComponentModel.DataObjectMethodType.Insert, true)]
3: public bool Add(
4: string documentName,
5: string documentType,
6: string author,
7: string audience,
8: string purpose,
9: DateTime? dateWritten,
10: Stream attachment,
11: string userName)
13: DAL.Document dr = new DAL.Document();
15: dr.DocumentName = documentName;
16: dr.DocumentType = documentType;
17: dr.Author = author;
18: dr.Audience = audience;
19: dr.Purpose = purpose;
20: dr.DateWritten = dateWritten;
21: dr.UpdatedBy = userName;
22: dr.UpdatedOn = DateTime.Now;
23: Int32 docLength = (Int32)attachment.Length;
24: byte docBuffer = new byte[docLength];
25: attachment.Read(docBuffer, 0, docLength);
26: dr.Attachment = docBuffer;
28: return true;
We are moving to SubVersion…
We are finally moving off Microsoft Visual SourceSafe for source code control. The reasons for moving are:
The reason why we’re not going to Team Foundation Server is:
Seems like a good idea to me. Not sure I want to share the same repository as all other teams: might lose too much autonomy. We shall see.
Nothing new to report at this time
Last month, I made a mistake. I had thought (typo?) that the world-wide launch of Visual Studio 2010 was taking place on 22 March. Turns out to be 22 April.
Got our new MSDN Subscriber Licenses
Good for another two years of unlimited, legal downloads. I love working here.
If any of my non-Telecom friends are reading this and interesting in any of the above, then drop me a line so we can discuss eligibility and suitability.
In February, I sat and passed Exam 70-562
Skills being measured in this exam:
Renewed my MCT for another year…
I’m a Microsoft Certified Trainer again. Yippee! It means that Telecom gets a discount on MSDN subscription, and I get unlimited, free and legal access to all Microsoft Official Curriculum material.
I’m speaking to Auckland SQL Saturday in April…
On Saturday 10 April at Wolters Kluwer, 41 Centorian Drive, Mairangi Bay, North Shore.
My topic will probably be the Microsoft Sync Framework (again). I find it difficult (as a full-time Web Developer) to find topics of relevance to Microsoft SQL Server Database Administrators.
In this section, I highlight dates, times and venues of events either I am presenting at, or of interest to Geeks. I’m available for bookings.
One day, one of my first-grade students, Taylor, asked his grandmother if he was a child of God. "Why, of course you are, Taylor," she replied. He looked puzzled, then responded, "Well I better get home and tell Mom and Dad—they think I'm theirs!"
—Mary De Guzman, Greenville, SC. Today's Christian Woman, "Heart to Heart."