Big, Big News!

After 14 months of hard work, aggravation beyond description, despair of the blackest shade, and, yes, tears, a watershed event. I, erstwhile DI major, terrible math scholar, and programmer par non-excellence, have accomplished something that I have long dreamed about, talked about, and now, finally, accomplished.

Send in the band, please

I have accessed a database, extracted some data, and reported the results, using Python (nifty programming language). Just now, I literally dance for joy. The wife is stunned.

Herewith the details…..

The Code:

# A program to access the MaryRichards database, retrieve
# the tuples for the JOBS table, display as output the JOB id, job description
# and amount billed for the job.

import pyodbc

cnxn=pyodbc.connect(“DSN=MaryRichardsBackup;UID=The Tortoise;PWD=lucky7”)

except pyodbc.Error, error:
print “Error — No access”
print “Connected”
cursor = cnxn.cursor()

# Select some values from the database and print them:

cursor.execute(“select * from job”)
allrecs = cursor.fetchall()
for row in allrecs:
print row.JOB_ID, row.Description, row.AmountBilled


The Result:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.

Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer’s internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.

IDLE 1.2.1
>>> ================================ RESTART ================================
1 Paint exterior in 794 White 2750.0000
2 Paint dining room and kitchen 1778.0000
3 Prep and paint upstairs bath 550.0000
4 Paint exterior doors in 633 Red 885.0000
5 Prep and paint interior wood trim 1299.0000

I Exult………


1 Response to “Big, Big News!”

  1. 1 Dan April 22, 2008 at 1:26 pm

    Congratulations! As you know, I’m not kidding when I express my envy and admiration for this feat.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

“Life’s hard, son. It’s harder when you’re stupid.” — The Duke.

Education is a companion which no misfortune can depress, no crime can destroy, no enemy can alienate,no despotism can enslave. At home, a friend, abroad, an introduction, in solitude a solace and in society an ornament.It chastens vice, it guides virtue, it gives at once grace and government to genius. Without it, what is man? A splendid slave, a reasoning savage. - Joseph Addison
The term informavore (also spelled informivore) characterizes an organism that consumes information. It is meant to be a description of human behavior in modern information society, in comparison to omnivore, as a description of humans consuming food. George A. Miller [1] coined the term in 1983 as an analogy to how organisms survive by consuming negative entropy (as suggested by Erwin Schrödinger [2]). Miller states, "Just as the body survives by ingesting negative entropy, so the mind survives by ingesting information. In a very general sense, all higher organisms are informavores." - Wikipedia

Blog Stats

  • 30,798 hits

%d bloggers like this: