Import a large .sql file into SQL Server using the command line

Import large sql file using command line

A lot of the time we deal with small databases with small data. Importing a backup database is usually ok for these databases using the SQL Server Management Studio. We would normally just open the .sql file we want to import in Management Studio and then click on the Execute button to import it into a new or existing database. Sometimes this just isn't possible. Large databases or big tables mean that the overhead required for SQL to parse and run the scripts just isn't possible.

Dragnet Systems is looking to hire a new Tech Support Developer

new tech support developer role in Dragnet Systems

Dragnet Systems is looking to hire a talented .Net developer for a new tech support role. This is a new role in the company that aims to help reduce the level of support that the top tier developers have to give. Full training of all the in-house tools will be provided but you must have the basics so that you can hit the ground running.

Group, count and order top words or phrases in Excel 2007

This is going to be one of those posts that's probably more for me than anyone else but recently it drove me a little loopy trying to sort out a basic task. I was asked to take one of excel error reports one of our websites generates and get a count for the top 20 recurring error messages. Sounds simple enough you might say, well thanks to Excel unless you know where to dig it can be a little frustrating to do!

Need to do a word count from a Word, Excel, HTML, XML or PDF file?

Count Anything

I had to send on a word count to a customer recently. Nothing new there. Client's ask for word counts all the time, especially if they are getting content translated. Usually I copy the text into Word document and do a word count from there but this was proving too time consuming.

A quick search online and I stumbled onto a small program called 'Count Anything'. It's a free program for Windows users that allows you to drag any supported file onto it and it lets you know the number of words and characters in the document. Very handy!

I love finding programs like this. If you know of any other neat little programs you use day to day let me know.

RTE News Reader for Windows Phone gets a new update

Just a quick post to say that my RTE News Reader app for Windows Phone has been upgraded to version 1.6. This new version fixes a small bug that prevented users from re-read the same article after they returned to the article from IE. The big improvement for this version is that the app now displays the content from within it. I don't open up the web browser in a separate window anymore.

This proved a little tricky to do as it meant I had to scrape the site and parse the HTML. I did this by using the excellent HTML Agility Pack for Windows Phone. The one gotcha here was that I had to make sure I encoded my web calls correctly. The default encoding was making Irish words or euro symbols come out all weird.

It's great to get another release of this app out the door. Hopefully you'll like it!

Arabic culture that uses the Gregorian calendar

Arabic culture that uses the Gregorian calendar

One of the multilingual sites I work on was recently converted to Arabic. The site was already running with French, German, Polish and a whole host of others but Arabic was our first right to left language on this particular site.

Once we got the right to left stuff working for our HTML - mostly by using the 'direction' attribute in CSS - we noticed that our code was failing when displaying dates in the system.

How to get Wordpress working on Blacknight's Windows hosting

I recently setup a Wordpress site on my Blacknight Windows hosting account using their Web Applications tool. During the setup I had 2 issues that I could not find any blog posts on that I thought might be useful to other people out there who are trying to do the same thing as me.

My requirement was to install Wordpress on the root level of my domain.

Files uploaded through Wordpress on Windows Server are missing permissions

When uploading files in Wordpress, PHP uses a temporary upload folder. By default PHP will use the C:\Windows\Temp when uploading files. If you install PHP and Wordpress onto your Windows server then you might notice that any files uploaded through Wordpress are not accessible on your site. This is down to PHP taking the folder permissions from the C:\Windows\Temp folder which does not have public access granted on it (for obvious security reasons!).

Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

I was working recently on an import script that would allow the end user upload an excel file, read it and import the data. Everything worked great on my own computer but when I ran the project on our Windows Server 2003 the project would fail when attempting to open the .xlsx file. The error returned to me was:

Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Obviously the server was missing the component required to read in a xlsx excel file. To solve this issue you need to download the 2007 Office System Driver: Data Connectivity Components onto your server. No server restart is required to install this tool and once it is installed everything will work as expected and your .net project will be allowed open and read .xlsx files.

There is already an open DataReader associated with this Command which must be closed first

I was working on one of my Entity Framework Code First websites the other day when I noticed the following error being returned to me:

There is already an open DataReader associated with this Command which must be closed first

Doing a few searches online I could see some of the solutions were to include the parameter 'MultipleActiveResultSets=True' in your entity framework setting in the web.config. However, when I checked my web.config to look for this setting I noticed that I did actually have it all setup as expected.

Doing some more digging around I noticed that the cause for this issue is down to an issue with deferred execution in some of my queries.

The solution was to add a simple .ToList() at the end of my query.

A simple fix but one that drove me nuts for a while!


Follow me online at TwitterFacebook or Flickr. If you want to get in touch with me try emailing me.

Latest Tweets