Portable ODBC connection driver - mysql

Is there any availability to make MySQL ODBC connection driver portable? I develop an application which uses MySQL ODBC ocnnection driver with TADOConnection and everything is working properly on developer's machine, there ODBC connection driver is installed. When I run this application on another machine (no ODBC driver installed) an error raises. Is there any opportunity to include necessary libs to program and make the project independent?

You can bundle the MySQL ODBC driver with your installer (http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-installation-binary-windows.html), but remember that if you're using the free GPL connector you're bound to the GPL, thereby or you release your application (and code) under the GPL as well, or you're violating the MySQL GPL license. To avoid it, you can always buy a commercial license.

ODBC needs a driver since it is an API abstraction over existing database access libraries - see How to explain why ODBC requires a database driver
Since there is no standard way of installing a database driver, you'll have to rely on the driver instructions, which are specific.
For MySQL, if you launch setup -r it would install the ODBC provider silently.
The follow these steps to add your database connection: create mysql odbc connection through batch script

Related

MySQL ODBC driver installation error

When listing the ODBC drivers in iODBC, the MySQL drivers don't have any version numbers next to them. If I click on them to configure, I get an error saying "General Installer Error".
I've tried reinstalling the drivers via the oracle mysql connector installer, but no luck. Any idea what could be wrong here?
A version of ##.## here indicates that iODBC couldn't fully load the driver to interrogate it about its version. Among other installation errors, this may mean the driver library (and/or a library on which it depends) has incorrect permissions set, or there may be some library incompatibility at some layer.
Further troubleshooting would require review of the ~/Library/ODBC/odbcinst.ini (User) and/or /Library/ODBC/odbcinst.ini (System) driver registration files; screenshots of the columns not visible here (note the horizontal scrollbar); output of otool -L against each of the driver libraries in question; and/or other information. Such troubleshooting is not appropriate for this site; I would recommend pursuing assistance through the driver provider.
Worth noting -- my employer maintains and supports iODBC, and offers alternative ODBC drivers for MySQL; you may want to take advantage of the free two-week trial.

ODBC Driver 13 and ODBC Driver 11

Can I install both ODBC Driver 13 and ODBC Driver 11 on the same server?
I need to access Microsoft SQL 2008 database and Microsoft SQL 2016 database. First one requires ODBC Driver 11. Second one requires ODBC Driver 13.
Would they be independently use by the system?
Update:
I have installed both drivers 11 and 13. I still can't work with my 2008 database.
Not sure if I need to restart? Did not restart as installation did not ask for it.
It appears you can simultaneously install ODBC 11 and 13|13.1 since the filenames are different and even Microsoft suggests you can change the connection string. (I do not have yet a server with SQL 2016 on testing environment. Therefore, I can not test it).
How to differentiate which application will use which?
To quote from the Microsoft's pages:
When an application uses the driver, the application should indicate
that it depends on the driver through the install option APPGUID.
Doing so enables the driver installer to report dependent applications
before uninstalling. To specify a dependency on the driver, set the
APPGUID command-line parameter to your product code when silently
installing the driver. (A product code must be created when using
Microsoft Installer to bundle your application setup program.) For
example:
msiexec /i msodbcsql.msi APPGUID={ <Your dependent application's APPGUID> }

Using the correct mySQL ODBC driver in windows

I am trying to connect MS Access with a local mySQL database.
To do this I downloaded the mySQL ODBC connector from the mySQL website and installed it. As I am on a 64-bit system I went for the 64-bit version.
I then discovered when trying to connect Access to mySQL that my installation of Office is actually 32-bit so the driver doesn't work. So I removed the 64-bit ODBC driver and installed the 32-bit one.
Problem is, when I go into control-panel -> Administrative Tools -> Data Sources (ODBC) and try to add a new data source, the only options for the mySQL drivers seem to point to the old directory where the 64-bit drivers were. It then fails as it can't find the dlls with system error 126.
How do I get it to show the 32-bit drivers?
Run the 32-bit manager by running this command:
c:\windows\syswow64\odbcad32.exe
Also you can use RegisterDatabase() function to create connection from your code.
I wrote wrapper function many years ago:
http://5codelines.net/kak-programmno-sozdat-odbc-dsn/.
Just skip russian language and use the code.
Prior to installing the ODBC MySQL driver 5.2.6 you need to install the Microsoft Visual C++ 2010 Redistributable Package for x64 or x86 or both (just search the Microsoft site for these and download from there). Other driver versions may require different versions of this MS VC++ Redist. Package, which can coexist side by side. By default server 2008 R2 comes with the 2008 version, so installing the 2010 is required. Before installing check in Programs and Features if not already installed. Depending on you application it may require the 32 bit or the 64 bit version. Without it you get the system error 126
Then install the drivers:
To install the 32 bit version run as administrator c:\windows\syswow64\odbcad32.exe which is the 32 bit version of "Data Sources (ODBC)"

Setup sybase DB connection in SQL developer?

Can we connect to the sybase db server using SQL developer.
If yes what are the configuration settings we need to make?
Can we use the same tnsname.ora file in the Oracle directory or do we need to install a sybase client seperately for getting connection informa
In Oracle SQL Developer 3:
You need to download the "JTDS JDBC Driver" extension via Oracle SQL Developer's GUI under Tools / Preferences. The description of this extension only mentions Microsoft SQL Server, but it can also be used for Sybase.
Once it's installed, you should see 2 new tabs in the Create Connection dialog: (MS) "SQLServer" and "Sybase".
I did not have to set up a 3rd party JDBC driver (a reference to a Sybase JDBC connector JAR).
You have to configure a new JDBC Driver into SQL Developer.
You can follow these instructions:
http://www.oracle.com/technetwork/database/migration/jdbc-migration-1923524.html
Basically you have to download the supported version of the open source jTDS driver (1.2) and then add the jar file in "Third Party JDBC Drivers" on "Preferences".
I got the solution.
We can download the Sybase plugin which allow us to use SQL Developer for Sybase.
Or we can use JDBC ODBC bridge tweaks for SQL developer.
Can be downloaded for free.
Link to download the JTDS driver. Just add it to your Oracle SQL developer and you are done!!

Database error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I am running SMS Enabler software in a Windows 7 environment. When a message received, the database is not updating and gives the error.
Database error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I also added the required field in Control Panel\All Control Panel Items\Administrative Tools > Data Sources (ODBC) > User DSN
I am using MySQL.
OK.... If test connection succeeds and your app fails then it is probably one of those awkward environment issues..
Things to check -
Have you creates a System DSN or User DSN?
If your application is running as a System Service then it will only able to read System DSNs (not User DSNs)
Was the Driver installed for all users or just the installation user?
I have seen instances where this has affected some drivers...
Use Process Monitor (an excellent tool for tracking down issues like this)
If you haven't used Process Monitor - think of it as a sniffer for; file accesses, registry accesses and network access...
That is - you will be able to determine whether there are any files or registry accesses that are failing or being blocked.
To use SMS Enabler with MySQL you should install MySQL Connector/ODBC 5.1 32-bit. You should install 32-bit version of this connector even if you are on 64 bit Windows. This is because SMS Enabler is a 32-bit software.
Wondering again whether this is a 32/64bit issue?
There are two ODBC administrators on 64bit machines...
c:\Windows\system32\odbcad32.exe === 64bit === Also through Control Panel
c:\Windows\SysWOW64\odbcad32.exe === 32bit
If your application is 32bit then you need a 32bit ODBC Driver and have to create a 32bit ODBC data source.
If your application is 64bit then, similarly, you need a 64bit ODBC Driver and have to create a 64bit ODBC data source.
I am wondering whether your application is 32bit and hence cannot find the 64bit ODBC data source you have created...
(NOTE: all of this is only applicable on 64bit Windows OSs...)