Category Archives: Uncategorized

Scott Hanselman raising money to fight Diabetes.

Diabetes is a topic near and dear to my heart. I have had close family suffer from it and a few pass away because of it. In fact, I’m a high risk, due to family genetics, of developing Adult Onset Diabetes (Type II) as both of my uncles on my mother’s side developed diabetes in their 40s. My grandmother and several of her brothers and sisters are also suffering from it as well.

 

 

All that being said – Scott Hanselman (http://www.hanselman.com/blog/TeamHanselmanAndDiabetesWalk2006.aspx) is walking to raise money for the fight against Diabetes.

 

 

Please visit and see if you can help out this very worth cause that definitely affects someone that you know. 

More adventures with SQL Server Express

This was fun. It’s a completely different database and set of circumstances than last night’s fun and frivolity.

I finished an application, zipped up the folders and sent it off to a client. In this application there is a desktop app that talks to a web service that talks to a SQL Server 2005 Express database. Sounds fairly simple, right? Right.

Well, the client unzips it all to a directory, sets up the virtual application for the web service and starts trying to run the desktop portion. It starts up, pulls up all of the lookups that we have in the database and it all looks good. Now, I’m on the phone and elated at how smooth this is going. At this point, the client tries to create a new record which is going well (wow, even a little drop down calendar and oooh look at that, it’s all of the types of records that I could create so I don’t have to type there… wow… and more gushing) until they try to save… At this point, there is a wonderful error that pops up –

“Failed to update database ‘database name.mdf’ because the database is read-only.”

Crud! After getting them to check the file properties and other such things, I called Patrick Steele, who has been working with me on this project, to see what he thought about it. It’s been a long day, especially after last night’s SQL Server Express issues, so I’m not thinking all that clearly. Patrick, after running through some of the same questions that I had so I’m feeling a little better about my thinking, has the thought that it might be a security issue and that the ASPNET user might not have permissions to write to that directory. Sure enough, since the ASPNET user doesn’t have permissions the database loads in read-only mode. Fix that and the database and the app work just fine.

SQL Server 2005 Express Issues

Yesterday I had to make a quick change to a SQL Server 2005 Express database that I’m using for an internal to SRT Solutions tool. I decided that the easiest way to do it was to leverage the auto-connect feature of SQL Server 2005 Express by just FTPing the mdb down, making my change and ftping it back up. This has worked a number of times in the past. Not this time. I got a “login failed for user ‘USERNAME'” when I tried to run the application. That was infuriating. I spent the next 4 hours or so working with the SQL Server Management Studio Express (Enterprise Manager lite for Express) assigning, unassigning permissions, users, attaching, detaching, backing up, restoring and everything else that I knew to do. I kept getting “User could not login to user’s default database” and general login failures. My personal favorite that I saw yesterday was “Could not attach, DatabaseName is not a primary database file. (Microsoft SQL Server, Error: 5171)”. Now, I’m usually pretty good with googling the answers, but this time I’m really coming up short.

All of this is proving to me that I’m a programmer, not an administrator. I’m digging the new functionality in SQL Server 2005 but I’m not going to be the one to administer the databases that I write code for.

Long story short – I raised the white flag. I IMed Jason Follas and asked him if he knew what was going on. He figured out that it had something to do with the master file that SQL Express was using for the auto-connect. He found this forum topic. Here’s the relevant snippet:

“When you first run SSE this way, it makes a local copy of master etc. in C:\Documents and Settings\<your user account name>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS.  That’s why it’s so slow the very first time it loads under a new user profile.  It may even timeout the first time you ever use it under a given profile.

Based on your description, it’s very possible something went bad in those files for some reason.  So, I would first make a backup and then delete the SQLExpress directory under C:\Documents and Settings\<your user account name>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data.  That will get rid of the local copy of master, etc.  Then, reboot. ”

Well – Lance (the author of the post and author of SQL Server 2005 Express Edition Starter Kit) was absolutely right. I killed the master files (after copious backups) and rebooted the machine. It’s working like a champ now. On reboot, it regenerated the master files needed and started right up.

Thanks Lance and Jason

4 Things Meme

Jim, I will get
you back for
tagging me…
J

 

Four Jobs I’ve Had…

·                 
Bailing Hay (Grew
up on a farm in Arkansas)

·                 
Security
Guard

·                 
Morning radio show
host

·                 
Software
consultant

Four
movies I can watch over and over…

·                 
The
Professional

·                 
Ronin

·                 
It’s a Wonderful
Life

·                 
Rosencrantz &
Guildenstern are Dead

Four TV
shows I love to watch…  (Disclaimer – similar to Jim’s, I watch a lot of TV with my
kids)

·                 
Myth
Busters

·                 
Get
Ed

·                 
Danny Phantom

·                 
English Premier
League Soccer

Four
places I’ve been on vacation…

·                 
Hot
Springs
, AR

·                 
Zurich,
Switzerland

·                 
Buenos
Aires
,
Argentina

·                 
Philadelphia, PA

Four
favorite dishes

·                 
Biscuits and
Gravy

·                 
Ham and Cheese
Omelet

·                 
Argentinean Steaks
– they cook them different there. It’s tender and melts in your
mouth…

·                 
Any meal with my
family

Four
websites I visit daily:

·                 
http://www.live.com

·                 
http://my.msn.com

·                 
http://www.techeblog.com  

·                 
http://www.geekswithblogs.com (well at least one of
the blogs under there…)

Four
places I’d rather be

·                 
Anywhere with my
kids

·                 
Anywhere on my
motorcycle

·                 
Golfing
Anywhere

·                 
Skiing – I’ve never
been but I’ve wanted to for a while

Four
bloggers I’m tagging

Jeff
Julian

Keith
Elder

Darrell
Hawley

Patrick
Steele

Ann Arbor .NET Developer Group’s first meeting last night

For our first ever meeting, I was thrilled with how last night went. We had 35 people show up for our first meeting. It was great to see all of the people in the room that I didn’t know. Of the 35 people, I knew about 15 of them. That’s one of the great things about user groups and community is that it’s a great way to meet people.

 

We are following the format that’s proven to work well at GANG where we have a 45 minute tutorial session followed by the 90 minute main presentation. The tutorial session is designed to give the audience the basic background that they might need to understand the main presentation. It also gives our members a good chance to get some speaking experience without as much pressure as the main presentation gives with a longer talk and a more advanced subject.

 

Jay Wren of ADP gave the tutorial session on Introduction to ASP.NET 2.0. Honestly, I was still running errands like getting copies of the eval made and all of that type of thing so I didn’t hear all of it. But what I did hear was very good and as complete as you can be in 45 minutes. It also seemed to be well received. We haven’t compiled all of the evals but it’s a good sign when there are people standing in line to ask questions afterwards.

 

Following that, I gave a session on ASP.NET 2.0 Personalization. See how the tutorial set the stage for this session? I actually stayed pretty close to on time. This is a new resolution of mine is to start staying within my time limits. I usually start answering questions within the time limits and then end up answering questions for a long time. I’m really trying to cut off the questions and have people with questions stay after and ask me offline so that we can cover it in more depth and people that aren’t interested can leave.

 

I enjoy the Personalization talk because there are a good number of GPMs (Gasps Per Minute). My brother, who is not a developer, came to Rockford, IL when I gave this same talk there and he loved it and phrased the term GPM. The code for the session will be up very shortly.