Wednesday, May 30, 2007

Microsoft "Surface"
MSNBC is reporting today the latest and sounds like last major project for Bill Gates. Think of a touch screen that is super-sized combined with a watcom tablet. At least that's what I think of it. It looks pretty cool!

Hmmm, of course, as a coffee table you'd have to be careful when you put your feet up, or put a cup of hot coffee on it... then again, maybe it'll tell you the temperature of the coffee or when it is low (by weight maybe) and trigger the pot to start brewing some more hot coffee... oh the possibilities.

Thursday, May 24, 2007

Open Source Softdrinks

Now food is getting into the open source arena:

How to make Open Cola

Yes, now you too can expand and improve upon the Open Source Cola. Hmmm.... I just hope I don't find any bugs in it.

Tuesday, May 22, 2007

Don't forget about User encryption with SSIS

So when you finally get your package done, and you want to run it scheduled, be sure to read over this to make sure everything is hooked up. I hit this issue a couple weeks ago and forgot about it again today. At least now it's in my blog, so I can find it without having to google it.

Here is another good link regarding importing a package and getting the permissions right:

More SSIS woes...

When using a Datareader with ADO.NET, a 5 character string coming from our AS/400 returns to me trimmed (everything I get from the 400 is fixed length). Where as when i pull the data from our sql servers, it's not coming back trimmed. It must be something to do with IBM's ADO.NET connection

SSIS: Flat File Connection Manager gotchyas

So my latest issue with SSIS: The Flat File Connection Manager.

Everything works fine, unless you want to add or remove a column from the source that the manager is connected to. Normally, with the other managers, etc. They pick up the change, or let you "fix" the change. Not with the Flat File Connection manager.

From what I've been able to find, you have to delete the manager, recreate it, and re-assign it to your flat file destination in order to "pick up" that extra column that you wanted. I use the flat file only for debugging the output of my package, before actually updating the database itself. Handy, except for that pesky issue. If I click the reset columns, I would expect to have the columns reset to the input. Nope, everything goes blank and you have to either delete the manager or hand enter the columns. Yikes!

Oh yeah, one more gotcha: if you run it without column headings check for the first row, then decide that you really want them, be sure to delete the files first, or you'll get really hosed.

Pretty much you'll be forced to delete the manager and recreate it.

Wednesday, May 16, 2007

SSIS packages and Variables

Today, I spent most of the day trying to figure out why the following:
(this is inside of an SSIS package, not just a query)

select * from foo where foodate >= getdate()- ?
where the variable for the data is set to 2.

And the package really did not like when I tried to do the following:
select * from foo where foodate>= dateadd(d,?,getdate) and used a -2 for the value. That time it threw all kinds of errors.

If I hard coded the number in, it returned the data that I wanted, but if I left it as a package variable nothing would work.

In the end I had to create a stored procedure passing the variable as a parameter in the SSIS package, and then things worked fine.

Oh well.

Note: Hopefully soon, I'll get several posts about how to from start to finish get a SSIS package running in Sql Server 2005.

Tuesday, May 15, 2007

It's a sad day.

Well, It's a sad day today. I knew this day was coming soon. But, my Beta fish, Phydeaux, died last night. I could tell something wasn't right. For the past few days, he wasn't eating well, and was just floating around the surface.

He was a good little fish: red, with bright fins. I'll miss him.

Monday, May 14, 2007

What a headache. . . linked servers and remote connections.

What a headache this has been. I've been trying to setup an SSIS package to run nightly for updating some data on a couple of our servers in development. After researching as to why I wasn't able to run the remote connection from our Sql Server 2k5 to Sql Server 2000. I finally generated this error:
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "FOO". The provider supports the interface, but returns a failure code when it is used.

and found the solution here

A little package that should have been run when the service pack was updated, but it didn't. I noticed that this is an issue with SP3 and SP4... too bad they didn't catch it in SP3 for the SP4 update. (though to be fair, they may not have known the package wasn't executing on the SP until people caught it with 64bit Sql Server)

Oh well. Hopefully, this will fix the error.

Thursday, May 10, 2007

Cool features of VMWare Workstation 6

Well, my friend found a really cool feature of VMWare workstation 6. It has a built in VNC server. So leaving the VM up and running, you can head home, and using a VNC viewer, you can now connect up to the VM and start working.

That will be a nice feature to use, so whether I'm at home or on vacation, if I have internet and a VNC viewer, I can still get to my desktop and keep working. I'm not sure what flavor they use, but it would be nice if they allowed for blanking the monitor and mouse like UltraVNC does.

Next Version of Sql Server: Katmai
It looks as though Microsoft just announced their next version of Sql Server, code name Katmai.

From their site:
SQL Server code name "Katmai," the next release of Microsoft SQL Server, provides a comprehensive data platform that is secure, reliable, manageable and scalable for your mission critical applications, while enabling developers to create new applications that can store and consume any type of data on any device, and enabling all your users to make informed decisions with relevant insights.

Wednesday, May 9, 2007

VMWare announces new version

VMWare just released version 6 of workstation and version 2 of player:

Currently, I have their free server running all of my development VMs on a nice external hard drive. That makes life really easy for bringing your work home... which might not always be a good thing.

It even works on Vista. I had a co-worker just get a new machine with vista 64 on it, and it works great.

Tuesday, May 8, 2007

VMWare Ctrl-Alt-Del

For those of you out there using VMWare, and are frustrated with the whole Ctrl-Alt-Del popping up the message that "VMWare has detected you pressed Ctrl-Alt-Del...." when you lock your host machine, I've found the answer. It appears that in VMWare workstation you can set a flag to ignore that.

Add to the file Buried in C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini the following:

mks.ctlAltDel.ignore = "TRUE"

and it'll ignore when ever you press control alt delete keys. Yeah! no more popups. For me, this has been working on VMWare Server 1.0.1 and since, and it's universal to every one on the computer.

Monday, May 7, 2007

An amazingly addicting game

So recently I've been spending my lunch hours playing a fun little game called Desktop Tower Defense.

This addicting game is way too much fun. Basically, you build a maze to shoot the baddies that move across the screen, or fly overhead before they can make it across. It's a great time waster, and I recommend, playing some of the challenge 4 minute games so as to not waste too much time playing.

Windows form Z-Order

An acquaintance on the Boise Software Developers group asked about finding the Z-Order for a control in a windows form last week. After a bit of searching, I found this for him. I figured, I'd put it here for anyone else who might need it:

int i = this.Controls.GetChildIndex(this.Label1);

While I'm not a windows form programmer, this should work. Just iterate through all the controls.

Wednesday, May 2, 2007

Converting a Column to a delimited string

Well, after a good bit of searching, I found a couple ways to convert a column of data to a delimited string. It's actually not too bad.

DECLARE @p_str VARCHAR(2000)
SET @p_str = ''
SELECT @p_str = CAST(O.OrderID AS NVARCHAR(6)) + ',' + @p_str
FROM (select OrderID
from Orders
where CustomerNumber = @CustomerNumber
) O

You have to set the @p_str to '' or it'll return a null. The other thing is that this method ends with a , that you may or may not have to trim.

The other method is this:

DECLARE @p_str VARCHAR(2000)
SELECT @p_str = COALESCE(@p_str + ', ', '') + CAST(OrderID AS varchar(5))
FROM Orders
WHERE CustomerNumber = @CustomerNumber

The second method does not need to have the @p_str set to '', and it doesn't end with a comma. So in the end, the second is probably the better method.

Tuesday, May 1, 2007

Gridviews, Excel and Ajax headaches

I'm working on a report that dumps out a gridview to excel. We are using the ajaxtoolkit, and I had wrapped the link to export the Gridview inside of an update panel with other various links to dynamicPdf reports. Well, unfortunately after a lot of searching, hair pulling and frustration. I found there is no way to contain the link inside an update panel because ajax raises an exception on the HttpResponse object. Bummer.

In the end, I guess it doesn't matter that much because I just have the spreadsheet save to the users desktop, and I don't display it inside of any panels.

If anyone has a work around for keeping the link inside the update panel, that would be great. I did find a function that would attempt parse the response string, and format it for ajax; however, I was never able to get beyond the errors.