Page 1 of 1

Remove ODBC DSN?

Posted: Tue Aug 28, 2012 8:27 am
by QooScho
Hello
I do a Create ODBC DSN Qoodary (uses driver SQL Server Native Client 10.0)
It works fine when installing the product. The ODBC DSN is available
But if I do the Uninstall of the product, the ODBC DSN is still available, but the Native Client driver is deleted

Is there a separat commad to remove the ODBC entry like e.g. Delete ODBC DSN or does the Uninstall normally remove also the ODBC DSN?
Or is it important to remove the Native client driver later in the MSI code?

Code: Select all

~InstallAware Clipboard Data~
~Create ODBC DSN~
~{3BAB383D-660E-46DA-8062-1905AA5C630D}~
~Qoodary~
~SQL Server Native Client 10.0~
~TRUE~
~Server=[SQLINSTANCE]$NEWLINE$Database=qoodary~
regards
Hans

Re: Remove ODBC DSN?

Posted: Tue Aug 28, 2012 9:43 am
by FrancescoT
Dear Hans,

if you are not using NATIVE ENGINE with your project, the ODBC DSN should be removed by Windows Installer Engine during uninstall.
So generally, no extra action is required.

Regards

Re: Remove ODBC DSN?

Posted: Tue Aug 28, 2012 11:55 pm
by QooScho
Dear Francesco,
no, I do not use NATVIE ENGINE in my project.

but again, I do a remove MSI of the Native Client driver and the driver is deleted. And when the driver is deleted you can normally not delete
the DSN if the DSN is connected to this driver.

So, is it important when the MSI package is removed in the MSI code?

regards
Hans

Re: Remove ODBC DSN?

Posted: Wed Aug 29, 2012 2:16 am
by QooScho
Hello,
I have just rechecked the situation.
If I comment out (deactivate) the removal of the Native Client Uninstall;

Comment: Install/Remove MSI Package $SQLNATIVECLIENTLOCATION$\sqlncli_x64.msi[REMOVE=ALL] (get result into variable ODBCNATIVEUNINSTALLRESULT)

If I do this, then the ODBC DSN entry will be removed successfully while uninstalling the product.
So, I assume that the Native client driver with removal of MSI package is done first in the uninstall process and then the ODBC DSN entry can not be deleted?

regards
Hans

Re: Remove ODBC DSN?

Posted: Wed Aug 29, 2012 8:09 am
by FrancescoT
Dear Hans,

Honestly, I haven't tried this before. This because generally runtimes are not removed during uninstallation and I never faced a similar condition.
Anyway, what your are reporting can be really possible and Runtime client removal could cause ODBC DSN removal problems.

In this case, if you really need to remove the Runtime client, do it just after Apply Uninstall in your script.
Doing this the ODBC DSN will be removed first ( ... by the Apply Uninstall call).

Anyway, I may suggest you to not remove the Runtime Client, otherwise if other apps belongs to it will not work properly anymore.

Hope this helps you.

Regards