Keyboard Face
msgbartop
when you find QWERTY imprinted on your cheek - it’s time to go to bed.
msgbarbottom

21 Apr 09 MSSQL: Joining another server in a select statment

I’ve often wondered if I could have a select statement that retrieved data from two databases at a time. I just got a SQL Server tip in the mail this morning that walks you through the steps. It’s awesome! Does everything and more. The keyword is OPENROWSET.

Here’s the link:
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1353663_mem1,00.html

Example from above article:

SELECT e1.EmployeeID, e2.FirstName, e2.LastName, e1.JobTitle
FROM OPENROWSET(
'SQLNCLI',
'Server=SqlSrv1;Trusted_Connection=yes;',
'SELECT EmployeeID, FirstName, LastName, JobTitle
FROM AdventureWorks.HumanResources.vEmployee'
) AS e1
INNER JOIN OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
'C:\Data\Employees.mdb'; 'admin';' ',
'SELECT EmployeeID, FirstName, LastName, JobTitle
FROM Employees'
) AS e2
ON e1.EmployeeID = e2.EmployeeID
ORDER BY e2.LastName, e2.FirstName

Here’s the MSDN link on OPENROWSET.
http://msdn.microsoft.com/en-us/library/ms190312.aspx

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

Tags:

17 Mar 09 Installing PHP on IIS

I just recently needed to install PHP on my development machine, which has Vista Home Premium on it. I downloaded the installer version of PHP5 from the website and ran it. It killed my IIS process and didn’t hook up to PHP extensions. Every 5 minutes, I’d get a IIS process stopped working message.

After searching the net for a good tutorial on how to install PHP on Vista, I found the following from an engineer at Microsoft. It worked like a charm:

http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx

You’ll need to download the zip version of php, not the installer, here:
http://www.php.net/downloads.php

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

22 Feb 09 Calendar Sync with the IPhone for Google Apps for Domains

Google just released a new feature - iPhone sync for Google Calendar! That was the first thing I tried to do when I got my iPhone. I ended up using a workaround through NeuvaSync.com. It worked perfectly and thus I was a little hesitant to try the official version out. The little banner at the top of my Google Calendar homepage, finally got to me though:

I had to try it out.

I went through all of the steps, but it the instructions didn’t work! It appeared that it worked perfectly for regular google calendar owners, but when you used Google Apps for Domains it didn’t work.

It took several hours of searching to finally figure out what was going on. The Mobile Sync wasn’t enabled in my Google Apps account. But also, I didn’t even have the ability to enable it! Here are the steps that I had to take to get Calendar Sync working for my Google Apps for Domains account:

1. Go to Domain Settings at the top:

2. All the way at the bottom, make sure that your control panel has Next Generation selected.

3. Now, go over to Service Settings on the top right. You’ll now have a “Mobile” option. This wasn’t there for me until I selected “Next Generation” in the control panel section.

4. Enable the Sync and you’re off. The original instructions link should now work perfectly!
http://www.google.com/mobile/apple/sync.html

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

17 Feb 09 Verify Email Address

Sometimes you just want to test an email address to see if it’s valid, but you don’t actually want to send them an email.

Instead of sending an email with the subject of “Just testing”, it’s a simple programming task to check the validity of the address. You can check the syntax, if the domain name is valid and if the receiving mail server will accept mail for the address.

I did a search today and found several websites. One was broken, but this one worked perfectly:

http://verify-email.org/

Do you have any other good ones that should be mentioned?

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

28 Jan 09 Testing Your CSS and HTML accross multiple browsers

It’s very important to test your code on multiple browsers. Your audience could have any of them and you want your site to look the best no matter what, even if they have an ancient computer.

I’ve found several very good resources out there that have excellent free options.

CrossBrowserTesting.com

I love this site. It actually gives you a remote desktop session with the OS and the browsers that you need to test.

BrowserShots.org

Enter your URL and it returns screen shots of your site in over 80 browser and OS combinations. It even gives you the option of downloading them all as a zip file. Extremely handy!

Lastly, if your site is running into problems with older versions of IE, there is no easy way to install previous versions of IE on top of a more current version.

Tredo Soft has a program you can install called Multiple IE’s. It lets you do just what you couldn’t. Install previous versions of IE and test them on your computer. No more waiting for browser sessions on CrossBrowserTesting.com just to test IE! Here is the link:

http://tredosoft.com/Multiple_IE

If you’re using Vista, Multiple IE’s won’t work, however. You may need to use My DebugBar’s IE Tester:
http://www.my-debugbar.com/wiki/IETester/HomePage

Best,
Tom

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

02 Jan 09 MSSQL Large Sub Query Impossibility

I recently had to query to find out how many records from one table were not in another really large table. When you do a select statement like this in MSSQL it overflows and gives you a response of 0. Not very helpful:

select count(*) from Table1 where Field Not In (Select Field from Table2)

All other ideas failing, I finally resorted to writing a query using a temp table variable:

set nocount on;
declare @Tables table (
PK int IDENTITY(1,1),
Field1 varchar(100), Field2 varchar(100)
);
insert into @Tables(Field1 , Field2 )

select t1.Field, t2.Field from Table1 t1
left outer join Table2 t2 on
t1.Field = t2.Field;

set nocount off;
select count(*) as Count, Field1 from @Tables
where Field2 is Null
Group by Field1
Having Count(*) < 2;

Talk about complicated! If you have any other better ways of doing this - please let me know!

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

22 Nov 08 Deactivating Youmail on IPhone

I just got an IPhone recently and set it to use Youmail. Youmail is a great service, but right now I actually found I wanted to just use the visual voicemail that comes with the IPhone. When traveling, I think I’ll want to be able to activate Youmail again because it is very handy the way it send you emails with your voicemails in them - it even transcribes them!

Anyway, I had a hell of a time finding the dialing codes to deactivate Youmail, so I put them here. I put them as contacts in my phone for future reference.

I previously posted a link to this article as having the codes I needed to deactivate Youmail:
http://arstechnica.com/journals/apple.ars/2008/08/16/on-disabling-voicemail-on-the-iphone

It turns out the codes only seemed to work. I ended up having to cancel my Youmail account and they then gave me the codes. Very frustrating.

To disable the Youmail service and revert to Visual Voicemail the code is ##004#. (This is on AT&T or Cingular).

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

18 Sep 08 CSS Image Replacement for H1 tags

I found a great new way to do this. The classic way is to text-indent -9999 pixels. It seems to me that the search engines, especially Google will be catching on to this method soon enough. I’d rather not be among the few still using this method when the ball drops on it.

I found it here at Mezzoblue. It’s the last one on the page, Shea Image Replacement.

http://www.mezzoblue.com/tests/revised-image-replacement/

What style the span to take up all of the space and have the background image. This effectively shoves the text out of view.

Here is the code excerpted from MezzoBlue:

code:

<h3 id="header" title="Revised Image Replacement">
<span></span>Revised Image Replacement
</h3>

/* css */
#header {
width: 329px;
height: 25px;
position: relative;
}
#header span {
background: url(sample-opaque.gif) no-repeat;
position: absolute;
width: 100%;
height: 100%;
}

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

25 Jul 08 Excel Tip: Getting rid of the personal.xls

When you create a macro that you want to use in multiple documents, it creates a new file called personal.xls.

What’s annoying about it, however, is that it now opens personal.xls whenever you open any excel file.

All you have to do to remove it is delete it. Now other settings need to be changed. The trick is locating the file in the first place.

You can often locate it by going to the File > Save As menu and then looking at the path it wants to save it in. It may be that some of the folders in that path are hidden.

On my computer it was located on this path:
C:\Documents and Settings\Default User\Application Data\Microsoft\Excel\XLSTART

Once you’ve found the path, open up Windows Explorer and delete it. You’re done.

I hope this helps someone. It annoyed me for weeks before I decided to get rid of it.

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

20 Jun 08 Gmail Signature Float Update

One of the annoying things about using Gmail (or Google for Hosted Domains) for business email is the way it handles your signatures.

Gmail has always taken and put your signature at very bottom of the email below the conversation, assuming that is where you’ll be writing your reply. I tend to like to reply at the top of the email, so I end up copy/pasting my signature each time. Quite a pain.

Then came Firefox and a Greasemonkey script that does the copy/paste for you. This worked great and all was well.

… Then GMail came out with a newer version of their interface and this broke the Greasemonkey script. Back to square one.

It’s been about almost a year now and the script hasn’t been updated.

But - at last! GMail came out with a feature that does it for you! It’s in GMail Labs, and it does exactly what this Greasemonkey script did, but now it’s part of GMail itself - so it works in any browser.

Yay! The little things that make my day :)

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb