Write the steps to establish DSN oriented connection and DSNLess connection
Answers
Answer:
Data source name is used for the hold the information regarding any databases, to access any database we need to make a DSN Connection to fetch the data from the database.
Where as in the connection with out DSN there we don't save the information of the database in the file , we just throw them into a connect string.
Steps for DSN:
1. connect to a DSN
2. Write SQL statement that will query the database
3. Fetch the data from the database
4. Close the connection
Steps for DSN Less:
1. Create an instance of the connection object
2. Define connection string, specify database driver
3. Write the SQL statement that will query the database
4. Continue with step 3 to 4 while there are records and move to next record
5. Close the connection and record set objects freeing up resources
Steps to establish DSN oriented connection and DSNLess connection:
Steps for DSN:
- Choose Start > Settings > Control Panel.
- 'Double-click ODBC' to open the 'ODBC Data Source Administrator' dialog box.
- Click Add.
Steps for DSN-Less:
- Method 1: The 'CreateTableDef' method allows to 'create a linked table'.
- Method 2: The 'DAO.RegisterDatabase' method allows creating a 'DSN' connection in the 'AutoExec' macro or in the startup form. This further makes to 'resolve the issue' by creating the 'DSN' connection in code.
To know more about ODBC
The basic ODBC library that routes calls to the appropriate driver:
https://brainly.in/question/8727702
Explain the ODBC architecture?
https://brainly.in/question/9132014