Search This Blog

Saturday, November 3, 2007

Cool Lego Model site with lots of Cad files


legoat.com - lego building instruction

Friday, October 5, 2007

My Lego Creations on MOCPages

I have posted to of my recent models built from misc box of 40lbs of legos bought off eBay

My MOC Home Page

LeoCad Model file for 7140 X-Wing

Model file is stored online using www.snapdrive.net

Friday, September 21, 2007

Dynamic sql to perform a SQL task on a list of tables

EXEC sp_MSforeachtable 'IF ''?'' LIKE ''%tbStaging%'' BEGIN PRINT ''?'' DELETE ? END '

Wednesday, September 19, 2007

Using SQL profiler to trace trigger execution

In Profile Trace add:
SP:StmtCompleted event because that’s where trigger execution appears.

T-SQL Determine Database ID

SELECT name, DB_ID(name) AS DB_ID
FROM master.dbo.sysdatabases
ORDER BY dbid

Sunday, May 20, 2007

Sample Code Adding Image control to FlowLayoutPanel


Example Code to Dynamically add Picturebox to a FlowLayoutPanel.

PictureBox pBox = new PictureBox();
pBox.ImageLocation = "C:\\Images\\Collages\\Faces.jpg";
pBox.SizeMode = PictureBoxSizeMode.Zoom;
pBox.Location = new Point(0, 0);
pBox.Height = 50;
pBox.Width = 50;
flowLayoutPanel1.Controls.Add(pBox);

Sunday, May 6, 2007

ADO.NET Data Binding Examples

An example shows how you can create a DataTableReader and bind it to a DataGridView

using (SqlConnection cn = new SqlConnection(cnStr)) {
SqlCommand cmd = new SqlCommand(sqlAllCustomers, cn); SqlDataAdapter adpt = new
SqlDataAdapter(cmd); DataTable dtCustomers = new DataTable("Customers");
adpt.Fill(dtCustomers); DataTableReader dtRdr = ds.CreateDataReader();
dgvCustomers.DataSource = dtRdr;
}


Load method of a DataSet or a DataTable, you can pass in a DataTableReader or any reader class that implements the IDataReader interface.

DataTableReader dtRdr = dt1.CreateDataReader();
DataTable dt2 = new DataTable();
dt2.Load(dtRdr);


DataSet can be filled from the Products table of the Northwind database.
string sSQL = "SELECT * FROM Products";
string sConnString = "Server=(local);Database=Northwind;Integrated Security=SSPI;";
SqlDataAdapter oDa = new SqlDataAdapter();
DataSet oDs = new DataSet();
using(SqlConnection oCn = new SqlConnection(sConnString))
{
SqlCommand oSelCmd = new SqlCommand(sSQL, oCn);
oSelCmd.CommandType = CommandType.Text;
oDa.SelectCommand = oSelCmd; oDa.Fill(oDs, "Products");
}





Friday, January 19, 2007

500 mllion people can't be wrong or can they!

Either way, I caved... I am now blogging.

What wonders can the bored public find here?
  • naked pics... NO
  • Serialz for software you're too cheap to buy... NO
  • MP3s of big hair bands from the 80s... Definitely NO
Just links to stupid crap I am interested in:
  • Rock and Mineral Collecting Info
  • Useful software dev. examples
  • Lego Sets of Interest
  • Companies I will erase once my WayBack Machine is up and running.