Q:

Schema.ini Text Width Limit too Short

I created an ODBC connection to a text file which is full of log entries in VS 2012 thanks to some insight from this thread Microsoft Access Text ODBC Driver on Windows 7. Currently I'm only running queries on the file from within the Query Designer in VS.
My schema.ini file looks like this:
[logFile.txt]
ColNameHeader=True
Format=FixedLength
MaxScanRows=0
Col1=Thread Integer Width 6
Col2=Date Integer Width 6
Col3=Time Integer Width 11
Col4=File Char Width 5
Col5=Data Char

and a sample line from the log is: 

1124  0905  144022706  FILE   SomeFile::SomeFunction(), Some Log Message // Stuff001.CPP

The query runs successfully but I have some log lines where the Data portion is thousands of characters long but the Char type supports a maximum of 256 characters.
I've found alternatives such as Memo and LongChar (http://msdn.microsoft.com/en-us/library/ms709353%28VS.85%29.aspx) but whenever I substitute either of the two I get an error:

ERROR [HY000] [Microsoft][ODBC Text Driver] In the text file specification 'logFile.txt', the Data option is invalid.

Great! Am I stuck with clipped log lines or is there an alternative? I'm on Win7 64-bit btw.

A:

Found the solution. While Char can be used without specifying a width the same cannot be said about LongChar.
My new schema looks like this:
[logFile.txt]
ColNameHeader=True
Format=FixedLength
MaxScanRows=0
Col1=lThread Integer Width 6
Col2=lDate Integer Width 6
Col3=lTime Integer Width 11
Col4=lFile Char Width 5
Col5=lData LongChar Width 24032

There was a performance hit with the lData width being set to 24k, but no noticeable difference when it was set to as much as 4,000. There is more information about ODBC text files at http://msdn.microsoft.com/en-us/library/ms715429(v=vs.85).aspx.

