Browse Ask a Question
 
Tools Add
Rss Categories

CardExchange uses the first line of a txt/csv as header

Author: Peter Stebbins Reference Number: AA-00406 Views: 81 Created: 2012-01-04 10:31 Last Updated: 2012-01-04 14:31 0 Rating/ Voters

If you are connecting to a text data source CardExchange (or more specifically the MS OLEDB connection) will use the first line of the text file as the header. This is normal behavior for MS text connections. You may want to use this line as data in CardExchange and in this circumstance you can create a schema.ini file in the same directory as the text file to tell CardExchange/MS Data Connection how to handle the text file.

An example of a schema.ini file contents is as follows:

Code:

[samplefile.txt]                                      ' This line names the file to apply the following settings, 1 schema.ini file can configure multiple files
ColNameHeader=False                    ' This line tells the data connection if a header exists, in this case no
Characterset=ANSI                             ' Which character set to use, if in doubt use ANSI
Format=CSVDelimited                       ' Format of file (TabDelimited, Delimited(custom character)) see MS links
Col1=Key Text                                      ' Provides the column name, and format (Text, Short, Currency, Date etc.) see MS links
Col2=Number Text
Col3=Surname Text
Col4=Firstname Text
Col5=DOB Text


'The comments above are not normally part of the file, delete them if you are copying/pasting this information.

Please Note: If you are experiencing problems with this, try placing both the txt file and the schema.ini file in the CardExchange Data folder.

Full definitions of the schema.ini file can be found at the following MS Links follows;
http://msdn.microsoft.com/en-us/library/ms709353.aspx
http://msdn.microsoft.com/en-us/library/ms404679(VS.80).aspx

Attachments
schema.zip 262 b Download File
Rss Comments
  • There are no comments for this article.
Info Add Comment
Nickname: Your Email: Subject: Comment:
Enter the code below:
Info Ask a Question