My initialization string is non-conforming

I was importing data from Excel when I received this message:

System.ArgumentException: Format of the initialization string does no conform to specification starting at index 144.

This was caused by a bad quote. Not a bad quote as in something from Napoleon Dynamite. No, a bad quote as in an incorrect quotation mark. Take this connection string snippet that I copied from a previous blog post:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\scott.stoecker\Documents\Frogs.xlsx;Extended Properties=”Excel 12.0 xml; IMEX=1; HDR=Yes;”

Word Press had formatted the quotation marks from the normal ones we see in Visual Studio or the VCC Manager (“) to the fancy kind approved by poets in turtlenecks hanging out in coffee shops (”). Changing the quotation mark to the boring old kind fixed the problem.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: