Question about MySQL Connector class

K

Ken Sorrow

So I'm developing a mobile application using the .NET CF 3.5 for
Windows Mobile 6.1 Professional. I've downloaded and installed the
MySQL Connector/.NET and added a reference to the
MySQL.Data.MySQLClient to my project. I've imported it with a Imports
MySQL.Data.MySQLClient and it seems like it's ready to use.

Now, I created a variable to hold my connection string like this:

Dim myConnectionString as String = myConnectionString =
"Database=openemr;Data Source=" & DatabaseServer.Text & ";User Id=" &
AdminUsername.Text & ";Password=" & AdminPassword.Text & ";"

This is according to the documentation.

Now, I try to create a connection called myConnection like this:

Dim myConnection as new MySQLConnection(myConnectionString)

That's where everything dies and I get this error:

Error 1 Reference required to assembly 'System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base
class 'System.Data.Common.DbConnection'. Add one to your project. C:
\Documents and Settings\Administrator\My Documents\Visual Studio
2008\Projects\OpenEMR Mobile\OpenEMR Mobile
\ConfigureClientConnection.vb 27 32 OpenEMR Mobile

So I allowed Visual Studio to fix it and it still throws the error.
Next, I manually added an "Imports System.Data.Common.DbConnection"
statement and still nothing.

I am at a complete standstill. Can anyone tell me what I'm doing
wrong?

Thanks!
ken
 
F

Family Tree Mike

Ken said:
I'm bumping this topic in the hopes I might get a response. Can anyone
help?

In your original post, you wrote the following:
So I allowed Visual Studio to fix it and it still throws the error.
Next, I manually added an "Imports System.Data.Common.DbConnection"
statement and still nothing.

What does "...allowed Visual Studio to fix it..." mean? I've never
known Visual studio to add the needed dll. You should have added a
reference to System.Data.dll as well as the imports statement that you
mentioned.
 
J

Jose Miguel

i have the same problem.

I need conect MySQL DB in server pc, and Pocket PC.

in VB.NET


Visual Basic.NET 2008 + Mysql Connector/net 6.2

or trie
MySQLMobile 1.8 (Mobile)



Ken Sorrow wrote:

I am bumping this topic in the hopes I might get a response. Can anyonehelp?
16-oct-09

I am bumping this topic in the hopes I might get a response. Can anyon
help?

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Useful Vista Tweaks
http://www.eggheadcafe.com/tutorial...81-b515-c80c5d6d00ec/useful-vista-tweaks.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top