If you need to import data from a Microsoft Access database to SQL Server, one simple way is to setup the Access file as a Linked Server. You can add the linked server using the SQL Server Management Studio GUI, or through T-SQL commands. Run the sp_addlinkedserver procedure to add a Linked Server. Follow that with sp_addlinkedsrvlogin to add a login to the Access database. Continue reading →
As the number of mobile Internet-connected devices continues to rise, so does the number of public-WiFi access points. “WiFi” window stickers are all over the place, advertising a “bonus” reason to stop by your local coffee shop, bookstore or Home Depot. While this may make multi-task shopping easier, it also exposes your activities to anyone else on the public network. All browsing data is broadcast to everyone on the public network who wants to see what you’re up to. To remedy this, you can create an encrypted SSH tunnel to a computer at home. The tunnel encrypts all of your web browsing data and sends it home first. The home computer then completes the browsing request and forwards the results back through the encrypted tunnel to your mobile device. This gives you the same security you’d have if browsing from your couch at home. This post explains how to setup a SOCKS proxy for an Android device without root.
Continue reading →
While working with Microsoft’s Open XML SDK 2.5, I came across some difficulties writing dates to an Excel workbook. When writing dates to an existing Excel file used as a template, I noticed that the dates I was passing to my writeToCell() method did not match the dates I found when I opened up the final Excel workbook. I used the Visual Studio debugger to grab the values I was attempting to write. I then opened up Microsoft Excel and pasted the values directly into a new worksheet. The values I pasted gave me the expected dates, but writing these exact same values to an existing Excel template using the SDK resulted in incorrect dates. Why didn’t the dates in the two Excel files match? It turns out that there are two supported date systems in Excel: one based on 1900 and one based on 1904. Continue reading →
Greetings dev[in]elopers! This is my first article as a contributor to this rocking blog. I just went through a horrible ordeal upgrading the hard drive on my Macbook Pro. Cloning the Mac partition and getting OS X to boot was easy, but cloning the Bootcamp partition turned out to be a huge pain. If you want to share in the pain (or learn a few things to save yourself) then read on!
As I embarked on a new mission to write a home media server application in C#, I needed a way to store an index of media files on my home computer. I could have gone the flat-file route, and stored file information in a simple delimited index file. Instead, I decided to delve into object-relational mapping (ORM) using the .NET Entity Framework. I’ve used ORM in past Java projects, utilizing the EclipseLink implementation of the Java Persistence API. If you’re not familiar with ORM, it basically lets you store and retrieve Objects in a standard relational database (T-SQL, MySQL, Oracle, etc.) without having to code SQL-queries (unless you want to). If you already have an existing database, ORM can generate classes based on tables in your database. If no database exists, as was the case in my media server project, ORM can take care of setting up the database tables and fields and matching classes for you. Early on in my project, some of my .NET Entity Framework auto-generated classes were not compiling. I was receiving the error: “does not contain a constructor that takes 0 arguments”. Since these classes were sub-classed from a custom abstract class, I realized I needed to somehow add an appropriate constructor to these auto-generated classes.