Monthly Archives: July 2004

mozdev.org – forumzilla: index

I’ve been looking around for a nice app to read some of my favourite blogs. I only want to see if a new item gets posted, and so I was pleased to discover forumzilla – an extension for the Mozilla … Continue reading

Posted in General | Comments Off

Output the contents of a DataSet in HTML

private void PrintRows(DataSet myDataSet) { // For each table in the DataSet, print the row values. foreach(DataTable myTable in myDataSet.Tables) { foreach(DataRow myRow in myTable.Rows) { foreach (DataColumn myColumn in myTable.Columns) { Response.Write(myRow[myColumn] + “”); } } } } This … Continue reading

Posted in C# Snippets | Comments Off

Populate a DataSet from a table in a database

// Database is called “MarcTest1″ // Table is called “phonebook” // DataSet is called “ds” string m_Connect = “Data Source=(local);integrated security=SSPI;Initial Catalog=MarcTest1;”; SqlConnection myConn = new SqlConnection(m_Connect); SqlDataAdapter da = new SqlDataAdapter(); myConn.Open(); DataSet ds = new DataSet(); string sQueryString … Continue reading

Posted in C# Snippets | Comments Off