To test database connectivity, you can export the Employees table of the Northwind database using the File > Export option of Access 2000. In this section, I'll export a table to a text file, and I'll show you how to use it using the ODBC data adapter. Exporting an Access Table to a Text File You can export an Access database table to a text file using the Export option. As you can see from figure 11-22, I selected the Employees table and chose file > Export. ![]() The next dialog box lets you pick a path and filename you want to export. There are many export options are available. As you can see from figure 11-23, I selected the Text files option, left the exported filename as Employees, and saved the file to the C:\root directory. ![]() Now, the Export Text Wizard lets you define the format of the text file. A dialog box lets you select either delimited or fixed width (see Figure 11-24). ![]() You can also select the Advanced option to set more options (see Figure 11-25). ![]() The next screen lets you pick the delimiter including comma, tab, semicolon, space, and others. I left the Comma option checked (see Figure 11-26). ![]() I also checked the Include Field Names on first Row check box. This option adds the first row of the text file as field names. The last page asks you the filename (see Figure 11-27). ![]() Now click the finish button. When the wizard is done exporting, you'll see a message saying the export is finished. Click OK and close Access. Now view C:\Employees.txt (see figure 11-28). ![]() |
Accessing Text File Databases in ADO.NET
Subscribe to:
Post Comments (Atom)







No comments:
Post a Comment