Remove ODBC DSN?

Got a problem you cannot solve? Try here.
Post Reply
QooScho
Posts: 152
Joined: Fri Apr 15, 2011 1:02 am

Remove ODBC DSN?

Post 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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove ODBC DSN?

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
QooScho
Posts: 152
Joined: Fri Apr 15, 2011 1:02 am

Re: Remove ODBC DSN?

Post 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
QooScho
Posts: 152
Joined: Fri Apr 15, 2011 1:02 am

Re: Remove ODBC DSN?

Post 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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove ODBC DSN?

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply