The first tells the ODBC Administrator where to find the setup information used when a new DSN is created the second tells the ODBC Administrator where to find the ODBC driver when an application refers to it in its connect string. Next, you need to tell the ODBC Administrator where to find the ODBC driver files for your new driver when it performs two different activities. In your case, use “CustomDriver.” The value for this key should be “Installed.”įigure 1: Adding the new ODBC driver, called “CustomDriver,” to the Registry The name of the string value should be the name of the new driver you are creating. Open “HKEY_LOCAL_MACHINESoftwareODBCODBCINST.INIODBC Drivers” and add a new string value to this key. You do this by adding a new string value to the “ODBC Drivers” key of the Registry. The first thing you need to do is tell the ODBC Administrator that there is a new driver installed. Once you understand how this works, you can use the windows API functions to open and write the specific keys you require to automate the process. The following is a walkthrough of how to create your own custom ODBC driver entry by setting specific values in the Registry by using the regedit utility. This way, you can ensure the location and specifics of the ODBC driver libraries that you want your application to use during normal operation, and you can ensure you will not affect the ODBC drivers of any other applications on the system if your application is updated or uninstalled. To prevent this, you can create your own custom driver name in the ODBC Registry on Windows, and make sure it always points to the SQL Anywhere ODBC driver that you install with your application. Worse, uninstalling another application may remove the ODBC driver that your application relies on, stopping your application before it can even start. Similarly, the installation of your program may overwrite an existing ODBC driver, potentially causing problems with other applications already installed on the machine. The next time your application runs, the user could encounter problems that will be difficult to track down. If another application that embeds SQL Anywhere is installed, it can potentially overwrite the ODBC driver your application installed with a different maintenance release or EBF build number, possibly incompatible with your application. As such, you have to consider how to prevent your SQL Anywhere components from being updated or replaced by another third-party application, outside of your control. A developer must consider the fact that other applications may also be using their own installations of SQL Anywhere on the same machine, without the end user knowing about it. The alternative is to create a connection string without using a DSN but instead using the installed driver name.Īs an example, consider an application that uses a SQL Anywhere database. A DSN then can be created for the application to use to connect to the database. When an application is deployed with ODBC on Windows, the ODBC driver must be installed into the Windows operating system. This article will discuss how developers can install custom ODBC drivers to ensure that your application’s drivers are not being overwritten. Problems can arise when deploying an application if it uses the same Open Database Connectivity (ODBC) drivers as other applications already installed on the same device. We may make money when you click on links to our partners. content and product recommendations are editorially independent.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |