Thursday 21 July 2011

ODBC

Adding an ODBC Driver:
1. Go to the ODBC Page in the Installation Expert.

2. Click on the Add command button.
3. Select Driver from the drop down list. The ODBC Driver dialog will appear.
4. Enter the name for the driver or click on the Import command button to import driver information from a saved driver file.
5. Click on the first Browse command button to specify the path to the DLL used for this driver.
6. Click on the second Browse command button to specify the path to the DLL used to configure this driver.
7. Now enter the attributes for the driver in the Driver Attributes window, one per line, using format: Keyword=Value.
8. Click OK. The driver is now recorded on the ODBC Page. If you wish to edit the driver, double click on the driver name.

ODBC Data Source:
A Data Source processes requests from the driver and returns the results. Essentially a data source is a back-end source of data with the connection information needed to connect the front-end application to the back-end database. In ODBC architecture an application connects to the ODBC Driver Manager, it in-turn selects the correct driver to connect to the DBMS.
A database server can have any number of operating databases. A Unique Data Source Name (DSN) must be given to the data source to specify which database to use.
The Data Source allows the user to select between three connections, User, System and File DSN's.
  • User DSN's are used for the connection of an individual user to a data source. This connection is very secure, but is not a good solution if distributed access is required. The DSN will only be visible to the specific user when he or she is logged on. User DSN connection information is stored in the HKEY_CURRENT_USER_ Registry key
  • Systems DSN's are good solutions when a single computer is expected to access the database. They are independent of who is logged onto the console. The connection information for a System DSN is stored in the HKEY_Local_Machine\ Registry. The major drawback in using System DSN connections is that the connections are dependent on the machine on which they have been set up
  • File DSN is located on the network and does not reside on any particular machine. File DSNs are available to all users who have the same drivers installed. In this way, multiple computers can use a single File DSN to access a Web server.
Adding an ODBC Data Source:
In the Installation Expert select ODBC Tab from the Feature Details section at the left of your screen.
1. Click on the Add command button. A drop down list will appear containing Data Source, Driver and Translator.
2. Select Data Source from the list. The ODBC Data Source dialog will appear.
3. Enter the name of the data source or click on the Import command button to import data source information from a saved data source file.
4. Enter the driver that will be used to access this data source.
5. In the Registration group box select either Register Per Machine or Register Per User radio buttons. If you wish to allow all users on the destination machine to access the data source then select Register Per Machine. If you wish to allow only the user who installs the MSI to access the data source then select Register Per User.
6. Now enter the attributes for the data source in the Source Attributes window, one per line, using format: Keyword=Value.
7. Click OK. The data source is now recorded on the ODBC Page. If you wish to edit the data source, double click on the data source name.

Adding an ODBC Translator:

1. Go to the ODBC Page in the Installation Expert.
2. Click on the Add button.
3. This time Select Translator from the drop down list. The ODBC Translator dialog will appear.
4. Enter a description of the translator or click on the Import command button to import an existing translator.
5. Click on the first Browse command button to specify the file that contains the translator.
6. Click on the second Browse command button to specify the file that contains configuration data for the selected translator.
Click OK. The translator is now recorded on the ODBC Page. If you wish to edit the translator, double click on the translator name
We have now recorded ODBC data source, driver and translator on the ODBC page. The ODBC page should now look like as shown below.

To remove an ODBC item:

Simply Select it from the ODBC Page and click the Delete button.

2 comments: