Link to home
Start Free TrialLog in
Avatar of bogorman
bogorman

asked on

Adding reference to mySQL ODBC driver to clickonce project

I have written a simple vb.net application using vs2005 which works well. It uses clickonce to deploy the program to users machines. I am a newcomer in this.

Although the deployment works on my own pc and laptop it does not work on users machines. When they try to install the program by clicking on the install button on the install webpage, they get an error "Missing required file"

I think the file in question may be the mysql driver as this is installed in all the machines where the deployment works. I have installed the mysql ODBC connector on these machines and the mysql 3.51 driver appears in the Microsoft DataSource Administrator box under Drivers on these machines but not in the users machines.

On the machines where everything works, in C:/Windows/System32 there are several myodbc3.* files, but if I use the browse tab in vs2005's  Add Reference box and select myodbc3.dll I get "a reference to mhyodbc3.dll could not be added" error. When I tried this I was intending to add the driver file as a reference so that it would be deployed to the users machines.  Is the "could not be added" error due to the windows32 directory being a hidden files one? If so, should I copy the file/files to another directory? If so, which files and to which directory?


Avatar of rionroc
rionroc
Flag of United States of America image

Hello


Before you compile your clickonce to deploy the program in any other machines, be sure you have set the [Copy Local] = True.


You can find it in:
Project properties Add reference, then click the reference file, and you will see the reference properties window inside solution explorer.



Great is our GOD.
:)
Avatar of bogorman
bogorman

ASKER

Hi,
thanks for your quick response.
Am not quite sure what you mean.

I can now see the properties for each Reference listed under "Reference" and, sure enough, they are all set to False. Do you mean that I should not have to add a reference to the mySQL driver (dll?) and then setting Copy Local to True should remove the problem? Unfortunately, cannot test it with one of the users machines until later in the day.
By the way, if it helps, the References which are listed are:

Microsoft Word 11.0 Object Library
System
System.Data
System.Deployment
System.Drawing
System.Windows.Forms
System.Xml

The application is a simple one which needs to communicate with the mySQL database to look up usernames and passwords.

Regards
Hi again,
Sorry. Omitted some of the references. The complete list is

Microsft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Word 11.0 Object Library
System
System.Data
System.Deployment
System.Drawing
System.Windows.Forms
System.Xml

Regards
ASKER CERTIFIED SOLUTION
Avatar of rionroc
rionroc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, rionroc for your help.