Logo

Creating a Data Source

 

Introduction

You may have created a database using an environment other than Microsoft SQL Server or MSDE. If you plan to use such a database to create a Windows application, you may have to create a data source first. This is usually easy to do. The most important detail is that the driver for your type of database must be already installed in your computer. This is automatically done during Windows installation for most database drivers.

 

Practical Learning Practical Learning: Creating an ODBC Data Source

  1. On the taskbar, click Start -> Programs -> Administrative Tools -> Data Sources (ODBC)
    If you are using Microsoft Windows 98, click Start -> Settings -> Control Panel. In Control Panel, double-click ODBC Data Source (32bit)
    If you are using Microsoft Windows XP, click Start -> Settings -> Control Panel. In Control Panel, double-click Administrative Tools and double ODBC Data Source
  2. In the ODBC Data Source Administrator property sheet, in the User Data Sources list of the User DSN property page, click the Add button:
     
  3. In the Create New Data Source wizard, scroll down in the list box and click SQL Server:
     
    Data Source 2
  4. Click Finish
  5. In the Name edit box of the Create A New Data Source To SQL Server wizard, type PeopleIKnow and press Tab
  6. In the Description edit box, type A List of People in my Life
  7. Click the arrow of the Server combo box and select the server where the Northwind database resides:
     
  8. Click Next
  9. Select the desired authentication. For this example, I accept the Windows NT Authentication. I also accept to connect to SQL Server with Default Settings by leaving the check box untouched:
     
    Data Source 4
  10. Click Next
  11. In the new page of the Create A New Data Source To SQL Server wizard, click the Change The Default Database To check box
  12. Once the combo box is enabled, click its arrow and select Acquaintances:
     
  13. For this example, leave the Attach Database FileName check box unchecked and accept the other defaults. Click Next
  14. Unless you have any other reason, accept the default (language, encryption, etc) settings of the new page:
     
    Data Source 6
  15. Click Finish
  16. On the ODBC Microsoft SQL Server Setup dialog box, click the Test Data Source button:
     
  17. When the SQL Server ODBC Data Source Test dialog box confirms that the TESTS COMPLETED SUCCESSFULLY!, click OK:
     
  18. On the ODBC Microsoft SQL Server Setup dialog box, click OK
  19. In the User DSN property page of the ODBC Data Source Administrator dialog box, make sure that the PeopleIKnow data store is listed in the User Data Sources list box
     
  20. Click OK
 

Home Copyright © 2004-2014 FunctionX, Inc.