Microsoft KB Archive/884038

= FIX: You receive an error message when you try to configure a Text DSN in MDAC 2.8 SP1: &quot;Ini File is corrupt&quot; =

Article ID: 884038

Article Last Modified on 11/15/2007

-

APPLIES TO

 Microsoft Data Access Components 2.8 Service Pack 1, when used with:  Microsoft Windows Server 2003, Standard Edition (32-bit x86)

 Microsoft Windows XP Service Pack 2 

-



SYMPTOMS
When you try to configure a Text Data Source Name (DSN) by using the Microsoft ODBC Data Source Administrator tool on a computer that is running Microsoft Windows XP Service Pack 2 (SP2) or Microsoft Windows 2003, you may receive the following error message:

Ini File (or Registry) \schema.ini is corrupt.

Note  is a placeholder for the path of the folder that contains the Schema.ini file on your computer.



RESOLUTION
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that this article describes. Apply this hotfix only to systems that are experiencing this specific problem.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.   Date         Time    Version     Size     File name ---  23-Jul-2004  05:45   5.2.9354.0  26,112   _sfx_.dll 24-Aug-2004 09:32   4.0.6305.0  278,559  Odbcjt32.dll



WORKAROUND
To work around this problem, specify the column type, as shown in the following Schema.ini file: [Sample.txt] ColNameHeader=False Format=CSVDelimited MaxScanRows=25 CharacterSet=OEM Col1=F1 Integer Col2=F2 Char width 255 Col3=F3 Integer

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

Steps to reproduce the problem
<ol> Create a text file by using Notepad. <ol style="list-style-type: lower-alpha;"> On a computer that is running Windows XP SP2, paste the following code in Notepad.

1, hello, 23

</li> Save the text file as Sample.txt.</li></ol> </li> Create a Text DSN, and then point the Text DSN to the folder that contains the Sample.txt file. <ol style="list-style-type: lower-alpha;"> In Control Panel, double-click Administrative Tools, and then double-click Data Sources (ODBC). The ODBC Data Source Administrator dialog box appears.</li> On the System DSN tab, click Add. The Create New Data Source dialog box appears.</li> Click Microsoft Text Driver (*.txt; *.csv) in the Select a driver for which you want to set up a data source list, and then click Finish. The ODBC Text Setup dialog box appears.</li> Type testds in the Data Source Name box.</li> Type Test data source in the Description box.</li> Click to clear the Use Current Directory check box, and then click to select the Select Directory check box. The Select Directory dialog box appears.</li> Locate the folder where you saved the Sample.txt file on your computer, and then click OK.</li> In the ODBC Text Setup dialog box, click OK.</li></ol> </li> Configure the Text DSN by using the ODBC Data Source Administrator tool. <ol style="list-style-type: lower-alpha;"> Create a text file in the same folder as the Sample.txt file.</li>  Add the following text to the text file: [Sample.txt] ColNameHeader=False Format=TabDelimited MaxScanRows=25 CharacterSet=OEM Col1=F1 Integer Col2=F2 Col3=F3 Integer </li> Save the text file as Schema.ini.</li> <li>In the ODBC Data Source Administrator dialog box, click testds in the System Data Sources list, and then click Configure. The ODBC Text Setup dialog box appears.</li> <li>Click Options, and then click Define Format. You receive the error that is mentioned in the &quot;Symptoms&quot; section.</li> <li>In the Error dialog box, click OK.</li> <li>In the Define Text Format dialog box, click Cancel.</li> <li>In the ODBC Text Setup dialog box, click Cancel.</li> <li>In the ODBC Data Source Administrator dialog box, click OK.</li></ol> </li></ol>

<div class="references_section">