Monday, April 13, 2009

Connection String Troubles

Having trouble nailing down your connection string for a database you're trying to connect to a Windows Form?

I did. 

I was looking over a bit of code that was intended to connect a Windows Form to a database containing user login information. The connection string looked like this:

String sconn;
sconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Documents and Settings\\Owner\\Desktop\\Royal Gas Station\\Royal Gas Station\\bin\\Debug\\Users.mdb";

But of course, this path won't work after we deploy the application. After all, we're not going to deploy it on the client's computer in a debugging folder on their desktop. After a bit of research, I turned up an interesting little snippet that retrieves the path at which the app has been deployed. Knowing this, I fixed the connection string and now it looks like this:

String sconn;
sconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\Databases\\Users.mdb";

Next time you're having trouble with the path, USE RELATIVE instead of ABSOLUTE, and make use of the |DataDirectory| alias.

Thursday, January 29, 2009

Get it Straight!

Arg!

Many might know and come to appreciate differences in competing brands. But when vendors mislead customers into thinking a product is one brand or another when it is not necessarily, or if the vendor simply isn't certain what brand their product is, the customer is frustrated and confused.

Enter the Revoltech Fraulein Yoko and Figma Yoko.

What is the difference between the photos in the above product detail pages? They appear strikingly similar. However, the products are from two different brands! What gives?

From personal experience, I like Figma over Revoltech. I prefer the non-clicky joints and some of the subtle character-to-character differences. Tohsaka Rin is a good example. I liked her Figma faces better than the Revoltech one. Also, Figma provides a lot more accessories and parts than Revoltech does.

I am presently in search of a Figma Yoko, but have yet to come across one (?), seeing as the one listed above doesn't appear to be a Figma but a Revoltech. I trust Hobby Link Japan's photos to be the true ones.

Isn't it frustrating when companies don't even know their products? It feels deceitful! It's like they don't care about their products or their customers. It feels as though they simply don't have a passion or a care for the things they sell. It doesn't sit well with me.

Monday, January 5, 2009

First.

I had to do it.

That aside, I also had to start a blog. Tell you what. You've obviously found my blog. If you stick around, maybe you'll find something worth looking at during your soujourn on the infinite sea of online content.