Tuesday, March 29, 2005

Video of an Actual Bug Triage at Microsoft

http://blogs.msdn.com/korbyp/archive/2004/10/26/248290.aspx

Visual Studio Team System Site

Visual Studio Team System Site
http://www.microsoft.com/vstudio/teamsystem
Version Control Blogs
http://blogs.msdn.com/korbyp/
http://blogs.msdn.com/buckh/
http://blogs.msdn.com/bharry/
Work Item Tracking Blogs
http://blogs.msdn.com/brianwh/
http://blogs.msdn.com/kkellyatms/

Friday, March 25, 2005

GMail Drive shell extension

Convert your gmail accounts into web space with this utility:


GMail Drive shell extension


Makes it as easy as drag and drop files in explorer and all files show under web UI as attachments in emails.. Also cannot drop a file of more than 10MB for now as gmail doesn't let you have more than that amount of file as attachment...

GMailFS for Windows | Gadgetopia

GMailFS for Windows | Gadgetopia

Wednesday, March 23, 2005

Export Dataset to Excel from ASP.NET

Morrison Schwartz > Products > QuickApps - Quick .NET Solutions

Inserting relational data using DataSet and DataAdapter - C# Database

The Code Project - Inserting relational data using DataSet and DataAdapter - C# Database

SQL Injection Attacks by Example

SQL Injection Attacks by Example

SQL Injection Attacks and Some Tips on How to Prevent Them - C# Database

The Code Project - SQL Injection Attacks and Some Tips on How to Prevent Them - C# Database

Building database application with ADO.NET for beginner. - C# Database

The Code Project - Building database application with ADO.NET for beginner. - C# Database

Developing .NET Custom Controls and Designers using C# (First Edition)

BlueVision, LLC - Developing .NET Custom Controls and Designers using C# (First Edition): "Developing .NET Custom Controls and Designers using C#"

Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML

Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML

Embed Excel in Winforms

Windows Forms Forums: "http://support.microsoft.com/default.aspx?scid=kb;EN-US;311765"

How to store multiple database tables in a DataSet

ASP.NET Code Example: How to store multiple database tables in a DataSet

Friday, March 18, 2005

How to Read Hierarchical Data into a DataSet

http://www.kbalertz.com/Feedback_309487.aspx (via .NET 247)

This example uses the Customers and Orders tables that are included with the Microsoft SQL Server sample Northwind database:
1. Create a new Visual C# Console Application project. Class1.cs is created by default.
2. If the Code window is not open, right-click Class1.cs in Solution Explorer, and then click View Code.
3. Delete all of the code from the Code window.
4. Paste the following code into the Code window:

using System;
using System.Data;
using System.Data.OleDb;


namespace CSharpSample
{
///
/// Summary description for Class1
///

class Class1
{
///
/// The main entry point for the application
///

[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
OleDbConnection nwindConn = new OleDbConnection("Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind");
OleDbDataAdapter custDA = new OleDbDataAdapter("SHAPE {SELECT CustomerID, CompanyName FROM Customers} APPEND ({SELECT CustomerID, OrderID FROM Orders} AS Orders RELATE CustomerID TO CustomerID)", nwindConn);

DataSet custDS = new DataSet();
custDA.Fill(custDS, "Customers");
DataRow CustomerRow, OrderRow;
DataRow[] OrderRows;
String sline;
int i;
CustomerRow = custDS.Tables["Customers"].Rows[0];
Console.WriteLine("Customer Row");
Console.WriteLine("Customer ID = " + CustomerRow["CustomerId"].ToString());
Console.WriteLine("Orders for Customer ID " + CustomerRow["customerID"].ToString());
// Retrieve child rows for the order
OrderRows = CustomerRow.GetChildRows("CustomersOrders");
// Do something with the child rows collection

for (i=0; i<=OrderRows.Length-1;++i)
{
OrderRow = OrderRows[i];
sline = (OrderRow["OrderId"].ToString());
Console.WriteLine(sline);
}
Console.ReadLine();
//
}
}
}


5. Modify the connection string as appropriate for your environment.
6. Press the F5 key to build and run the project. Note that the program's output appears as follows in the Command window:
Customer Row
Customer ID = ALFKI
Orders for Customer ID ALFKI
10643
10692
10702
10835
10952
11011
7. When you are finished, press ENTER to close the Command window.
When the Fill operation is complete, the DataSet contains two tables: Customers and CustomersOrders. The CustomersOrders table represents the chaptered column. An additional column that is named Orders is added to the Customers table. An additional column that is named CustomersOrders is added to the CustomersOrders table. The Orders column in the Customers table is set automatically increment. A DataRelation that is named CustomersOrders is created by using the columns that were added to the tables with Customers as the parent table.

Data binding Master-Detail-Detail-Detail...

:: sadeveloper.net

Sorting columns of a .Net ListView control (Ver 2)

Sorting columns of a .Net ListView control (Ver 2)

Multi Web Developer with VSS + VS 2003

:: sadeveloper.net

Data Application Block for OleDb

:: sadeveloper.net

Exception handling guidelines

:: sadeveloper.net

Keeping Passwords in a Database Secure

DotNetJunkies :: Keeping Passwords in a Database Secure

Build a Universal DAL Component

DotNetJunkies :: Build a Universal DAL Component

Using the DataGridViewComboBoxColumn to display a dropdown list in C# (VS 2005)

Using the DataGridViewComboBoxColumn to display a dropdown list in C# (VS 2005)

Using a DataGridView to display data from a database in Visual Studio 2005 (C#)

Using a DataGridView to display data from a database in Visual Studio 2005 (C#)

Data Access Application Block Revealed - Factory Methods and Reflection

Data Access Application Block Revealed - Factory Methods and Reflection

Using Microsoft Data Access Application Block - Article by Mohammad

Using Microsoft Data Access Application Block - Article by Mohammad

Strategy for Building a Pluggable Data Access Layer in .NET

15 Seconds : Strategy for Building a Pluggable Data Access Layer in .NET

Data Access Application Block

Enterprise Library

Data Access: Implement a Data Access Layer for Your App with ADO.NET -- MSDN Magazine, April 2003

Data Access: Implement a Data Access Layer for Your App with ADO.NET -- MSDN Magazine, April 2003

Creating a Data Access Layer in .NET - Part 2

15 Seconds : Creating a Data Access Layer in .NET - Part 2

Populating the TreeView Control from a Database

15 Seconds : Populating the TreeView Control from a Database

Online Database Functions Testing Tool

15 Seconds : Online Database Functions Testing Tool

Creating a Data Access Layer in .NET - Part 1

15 Seconds : Creating a Data Access Layer in .NET - Part 1

Thursday, March 17, 2005

5.35 How do I set the width of a column in my DataGrid?

Windows Forms FAQ - Windows Forms Datagrid: "5.35 How do I set the width of a column in my DataGrid?


To set a column width, your datagrid must be using a non-null DataGridTableStyle. Once this is in place, you can set the column width by first getting the tablestyle and then using that object to obtain a column style with which you can set the width. Here are some code snippets showing how you might do this.
//.... make sure your DataGrid is using a tablestyle
dataGrid1.DataSource = _dataSet.Tables['customers'];
DataGridTableStyle dgts = new DataGridTableStyle();
dgts.MappingName = 'customers';
dataGrid1.TableStyles.Add(dgts);

//......

//method to set a column with by colnumber
public void SetColWidth(DataGridTableStyle tableStyle, int colNum, int width)
{
try
{
tableStyle.GridColumnStyles[colNum].Width = width;
tableStyle.DataGrid.Refresh();
}
catch{} //empty catch .. do nothing
}

//....

// here is how you might call this method

private void button1_Click(object sender, System.EventArgs e)
{
DataGridTableStyle tableStyle = dataGrid1.TableStyles['customers'];
SetColWidth(tableStyle, 1, 200);
}
"

Windows Forms FAQ

Windows Forms FAQ

Best Practices When Using Microsoft Office Access 2003 in a Multi-user Environment

Office Developer Center: More Access Technical Articles: Best Practices When Using Microsoft Office Access 2003 in a Multi-user Environment

Importing and Exporting XSD Data in Microsoft Office Access 2003

Office Developer Center: Access Technical Articles: Importing and Exporting XSD Data in Microsoft Office Access 2003

Thursday, March 03, 2005

Secure ASP.NET sites from XSS

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh21.asp

Use the following module:
http://support.microsoft.com/kb/887289

If you think you can just hard code a few chars to prevent it, try
http://www.shocking.com/~rsnake/xss.html