Thursday, December 23, 2004

VFP: Change DSN Database on the fly

So I had to do some import work, using both SPT and Remote Views (which means a connection pointed to a DSN). Needed away to easily switch between databases.

It goes a little something like this...


*-- Flavor SERVER, UID and PWD to taste.
*-- Change server name in SetDataBase proc as well
#DEFINE C_CONNECT_SQL "DRIVER=SQL Server;SERVER=MyServer;UID=me;PWD=*;DATABASE="
#DEFINE HKEY_LOCAL_MACHINE -2147483646 && BITSET(0,31)+2
LOCAL lnConn && connection handle for SPT

SetDataBase("LIVE", @lnConn)

* do some stuff to LIVE data

SetDataBase("STAGE", @lnConn)

* do some stuff to STAGE data

*********************************************************
PROCEDURE SetDataBase(tcDatabase, tnConnection)
* Set connection handle to current database
tnConnection=SQLSTRINGCONNECT(C_CONNECT_SQL + m.tcDatabase )
* change DSN to current database
lcRegFile = HOME()+"samples\classes\registry.prg"
SET PROCEDURE TO (m.lcRegFile)
oReg = CREATEOBJECT("Registry")
oReg.SetRegKey("DataBase",m.tcDatabase ,;
"SOFTWARE\ODBC\ODBC.INI\MyServer",;
HKEY_LOCAL_MACHINE)
SET PROCEDURE TO
RETURN m.tnConnection
ENDPROC


sorry about the wrapping... this template isn't very code friendly...

Wednesday, December 22, 2004

100 programmers are lined up in a row by an assassin...

answers to technical interview questions

I was asked this question several months ago when I interviewed for a full-time gig at Microsoft. There were only 10 in the room, and I figured out how to save 6... but the best solution is much simpler than I imagined...

Thanks to John Donaghy for the link!

Monday, December 20, 2004

A Taste of XQuery for the DBA

A Taste of XQuery for the DBA

Eric McMullen has a good article on XPath in SQL 2005. XPath is the way to query XML data sets -- it's been well integrated into the next version of SQL Server.

VFP9 ships!

December 2004 - Letter from the Editor

WoHoo!

Mad props to the team, you guys did an amazing job!

Really large datasets in VFP

FoxPro Advisor :: The Ultimate Power & Speed of VFP


This article has been around for awhile, but it just surfaced in conversation recently. VFP is being used for the "Euro Tunnel". The data requirements for this application include 128 GB of data. Yes, VFP has a 2GB per table limit (not going to change), but this article points out how you can work around this limitation.

Monday, December 13, 2004

New Google trick

Well, new to me. Google Suggests type in a few characters and wait... (or hit the down arrow if you must...)

Friday, December 10, 2004

RF exposure FCC

I need a new cell phone, considering Bluetooth so I can have a wireless headset. Came across this:

"Tests for SAR are conducted using standard operating positions specified by the FCC with the phone transmitting at its highest certified power level in all tested frequency bands. Although the SAR is determined at the highest certified power level, the actual SAR level of the phone while operation can be well below the maximum value. This is because the phone is designed to operate at multiple power levels so as to use only the power required to each the network. In general, the closer you are to a wireless base station antenna, the lower the power output. Before a phone model is available for sale to the public, it must be tested and certified to the FCC that it does not exceed the limit established by the government-adopted requirement for safe exposure. The tests are performed in positions and locations (e.g., at the ear and worn on the body) as required by the FCC for each model. (Body-worn measurements may differ among phone models, depending upon available accessories and FCC requirements). While there may be differences between the SAR levels of various phones and at various positions, they all meet the government requirement for safe exposure.

For body worn operation, to maintain compliance with FCC RF exposure guidelines, use only accessories that contain no metallic components and provide a separation distance of 15mm (0.6 inches) to the body. Use of other accessories may violate FCC RF exposure guidelines and should be avoided."

Boot Camp - Mashing for Beginners

Great tutorial on "Mashing" -- puting two songs on top of each other. Includes Mackie's currently "Free" editor.

Tuesday, December 07, 2004

IBM Sells PC Business for $1.75 Billion

Well, maybe this means the Transnote could make a comeback.

Wednesday, November 24, 2004

Windows Installer Appears Every Time I Start an Application


I've run into this more than once, here is a an "unsupported" work around. Annoyances.org is a repository of such things...

Thanks to Tristan of ProFox.

Tuesday, November 23, 2004

Construx: Construx Estimate

"Construx Estimate contributes to project success by helping improve your software estimation capabilities. Estimate leverages a blend of proven estimation models to predict effort, budget, and schedule for your project based on size estimates. Estimate comes calibrated with industry data, but is most powerful when calibrated with your organization's data.
As part of our mission to advance the art and science of commercial software engineering, we provide Construx Estimate™ version 2.0 free of charge with a limited license."

Construx is the group that Steve McConnell (of Code Complete) runs. Great book, interesting tool. Thanks Boudewijn Lutgerink.

Monday, November 22, 2004

Firefox Extensions

Everybody knows how cool FireFox is... I've been addicted to tabbed browsing since Mozilla first introduced it. FireFox doesn't stop at just the browser... check out the extentions!

First -- if you love tabbed browsing, check out the Tabbrowswer Extentions. Great control over how tabs load and save. You can have all tabs come back up after a crash or even shutdown...

BlogThis! is like the Blogger link you get in the Google Toolbar...

FlashGot lets you pull down multiple files from a webpage in one move...

FoxyTunes lets you control Media Player, WinAmp, REAL, etc from a small controller in the browser status bar...

Oh... and a native behavior for FireFox... if you are on a site that supports RSS feeds, you should see a small orange icon in the bottom right hand corner of the screen. Click on it, and you'll create a bookmark that pulls the RSS feeds. Save the bookmark under the BookMarks ToolBar Folder and when you click on the link, you'll see the last several feeds from the site... too cool!

-dta
Toad® for SQL Server

"Toad® for SQL Server is a freeware tool that improves the productivity of developers and administrators by providing an easy-to-use development environment for T-SQL code."

Been around for awhile, this is a great tool -- a must for SQL Server DBA's and developers. Stored procedure version control, lots of automation...

Fully functional 60 day eval version available under Software Downloads.

Thursday, November 18, 2004

Who wants to be the Next Top Model?

Business Model Generator

"This is a free service provided by a research group of volunteers from the Sprott School of Business and Faculty of Engineering and Design at Carleton University in Ottawa, Canada.

We believe that sound business models are an essential, even fundamental, building block for new and established enterprises. For startups, a good business model can mean that the harder you work, the more money your enterprise will make, an obviously important consideration for new entrepreneurs. For existing businesses, even mega corporations, they need to continually update and revisit their business models to ensure that they are changing and responding to evolving conditions in their marketplaces."
Visual FoxPro 9.0: Still Here, Still Relevant

An OpEd piece I did for DevX.com.

I tried to provide managers a reason to give respect where it's due, and VFP die hards a reality check.

I was late getting it in, so I didn't get a chance to see the final before it went up, so there are a few errata.

If they don't get fixed, I'll post a follow-up here.

-dta

Tuesday, November 16, 2004

FlashPost

So the last month or so has looked like completing the contract testing gig with the Visual FoxPro team at Microsoft, restarting Alden Anderson (note to self: get a designer), speaking at DevCon, writing these articles and working at DevConnections and trying to restart this cranky Seattle Visual FoxPro Special Interest Group... which really, really needs a better name. ;)

Sorry I've been light on the posts, emails and phone-calls.

Thursday, October 28, 2004

CSharpFriends.com - C# Class Generator, ASP.NET Tools:

This is tool will automagically generate a complete c# class for you using 'raw' field inputs ( i.e input 'UserName', not 'strUserName' as my tool will prefix the type shortcut for you).

Friday, October 22, 2004

Pop!Tech - The Impact of Technology on People

"Pop!Tech is a one-of-a-kind intellectual and creative conference that explores the social impact of technology and the shape of things to come."

Wednesday, October 20, 2004

William Gibson blogs!

Of course he does... the father of "Cyberpunk" and all... but now it's marked!

Thanks GF!

Wednesday, October 13, 2004

NHibernate - a .NET based object persistence library for relational databases

NHibernate is a port of the excellent Java Hibernate relational persistence tool.

Hibernate is a powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries.