Using C#, I’m trying to create a form with a dataGridView that shows the contents of a fixed width, flat file database. Does using the “Microsoft Text Driver” require the use of a schema.ini file? Below is the connection string I’m using. I cant seem to get the grid to fill regardless of whether I use one or not but I’m not sure if I even need it to begin with. I’m not finding a whole lot of info on the subject. I’m also not sure if this is even the best method for working with such files. Any guidance would be appreciated.
string ConnectionString = @"Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:\files";
Thanks
It has been a while, but I believe you must have the schema.ini.
I used this driver often years ago. (Monthly reporting for four years.) Not too much need for it today. I never had a problem using it. Any problems were usually due to issues with the text file.
Schema.ini File (Text File Driver) at
http://msdn.microsoft.com/en-us/library/ms709353(VS.85).aspx
Bing Search at
http://www.bing.com/search?q=%22Schema.ini+File+%28Text+File+Driver%29%22
Information regarding this driver is under ODBC at MSDN Library.
Working schema.ini example for two text files: