We have a desktop POS built with vb.net and running on a local mysql db. We now want to add a PDA running windows CE 6.0 to execute some simple functions such as inventory management for which we need to connect from the PDA to mysql. We are developing the PDA app using vs 2008 in vb.net. The problem is trying to connect the PDA app to the mysql db. I have reviewed several threads (most of them unresolved) on several forums with no luck. I'm using the following connection method:
Imports MySql.Data.MySqlClient
Public Class Form1
Dim cn As MySqlConnection = New MySqlConnection("data source='localhost';database='dbname';user id='root';password='mypassword")
End Class
When I reference mysql.Data I get the error Reference required to assembly System.Data, Version=2.0.0.0, culture=neutral, PublicKeyToken=b7 bla bla containing the base class System.Data.Common.Dbconnection. Add one to your project. I tried adding System.Data.Common but error still wont clear.
I read somewhere that I should reference mysql.Data.CF rather, which I did and the error cleared. But then when I try to connect, I get an error at cn.Open() which says Unable to connect to any of the mysql hosts
So many other forums said so many other things that I tried without success.
If someone has successfully done this before, could you please point me in the right direction. Or maybe I have the whole idea wrong?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire