25. June 2005
Bob
FrontPage
Summary
This article discusses how to use a SCHEMA.INI file to access information that is stored in various text file databases.
More Information
Start a blank SCHEMA.INI file
- Open a Web in FrontPage 2003 using HTTP
- Start a new text file
- Click File -> New
- Click "Text file" on the Task Pane
- Save the file as "_private/schema.ini"
- Close the text file
Add a database connection for text file databases
- Click Tools -> Site Settings
- Click the "Database" tab
- Click the "Add" button
- Name the connection "TEXTFILES"
- Choose "File or folder in current web site"
- Click the "Browse" button
- Double-click the "_private" folder
- Choose "Microsoft Text Driver (*.txt; &.csv)" as the file type
- Click "OK" to close the dialog
- Click "OK" to close the database connection dialog
- Click "OK" to close the site settings dialog
Using a Comma-Separated Value file
- If not already open, open the Web form earlier in FrontPage 2003 using HTTP
- Start a new page
- Save the page as "CSVTEST.htm" in the root of your web site
- Insert a form on the page:
- Click Insert -> Form -> Textbox
- Right-click the form and select "Form Field Properties"
- Name the field "Name"
- Click "OK" to close the text box properties dialog
- Right-click the form and select "Form Properties"
- Click the "Options" button
- Specify "_private/CSVTEST.csv" as the output path
- Choose "Text database usign comma as a separator"
- Make sure that the "Include field names" box is checked
- Click the "Save Fields" tab
- Check the boxes for "Remote computer name", "Browser type", and "Username"
- Specify a format for both the date and time
- Click "OK" to close the options dialog
- Click "OK" to close the form properties
- Save and close the page
- Preview the page in your browser and submit several data items
- Open the "_private/schema.ini" file from earlier
- Enter the following information:
[CSVTEST.csv]
ColNameHeader=True
MaxScanRows=25
Format=CSVDelimited
CharacterSet=ANSI
- Save and close the "_private/schema.ini" file
- Start a new page
- Insert a database results region on the page:
- Click Insert -> Database -> Results
- Choose "TEXTFILES" for the connection and click "Next"
- Choose "CSVTEST.csv" for the record source and click "Next"
- Click "Next"
- Choose "Table - one record for row" and click "Next"
- Click "Finish"
- Save the page as "CSVTEST.asp" in the root of your web site
Using a Tab-Separated Value file
- If not already open, open the Web form earlier in FrontPage 2003 using HTTP
- Start a new page
- Save the page as "TABTEST.htm" in the root of your web site
- Insert a form on the page:
- Click Insert -> Form -> Textbox
- Right-click the form and select "Form Field Properties"
- Name the field "Name"
- Click "OK" to close the text box properties dialog
- Right-click the form and select "Form Properties"
- Click the "Options" button
- Specify "_private/TABTEST.txt" as the output path
- Choose "Text database usign tab as a separator"
- Make sure that the "Include field names" box is checked
- Click the "Save Fields" tab
- Check the boxes for "Remote computer name", "Browser type", and "Username"
- Specify a format for both the date and time
- Click "OK" to close the options dialog
- Click "OK" to close the form properties
- Save and close the page
- Preview the page in your browser and submit several data items
- Open the "_private/schema.ini" file from earlier
- Enter the following information:
[TABTEST.txt]
ColNameHeader=True
MaxScanRows=25
Format=TabDelimited
CharacterSet=ANSI
- Save and close the "_private/schema.ini" file
- Start a new page
- Insert a database results region on the page:
- Click Insert -> Database -> Results
- Choose "TEXTFILES" for the connection and click "Next"
- Choose "TABTEST.txt" for the record source and click "Next"
- Click "Next"
- Choose "Table - one record for row" and click "Next"
- Click "Finish"
- Save the page as "TABTEST.asp" in the root of your web site
References
The following articles discuss the SCHEMA.INI format and related concepts in detail; MSDN keeps rearranging their hyperlinks, so hopefully they are still live: