Link to home
Start Free TrialLog in
Avatar of rmmarsh
rmmarshFlag for United States of America

asked on

How to access a MySQL database on an internet server?

I have a C# program (desktop) that I want to access a web service.  That web service (also written in C#) needs to access a MySQL database sitting on the hosting server (a Windows server).  I imagine that connection string would have the site name(?) and database name, but haven't a clue how to put it together.

Can someone please give me a pointer to a doc or something?  
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru 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
Avatar of rmmarsh

ASKER

If I'm using the Visual Web Developer 2005, what choices do I have for a library?  I see the connection string is almost a no brainer, but still don't know what to use for the connection: ODBC?
Avatar of rmmarsh

ASKER

s/b Visual Web Developer 2005 *Express*
I mean, the mysql connection type: ODBC, OleDB, which have you selected?
The link I have posted give you connection string for all possibilities.
Avatar of rmmarsh

ASKER

Yes, it did... I guess I'll just pick one and see what happens... what do I put in the slot for "provider"?
in OleDB should be MySQLProv as shown.
Avatar of rmmarsh

ASKER

OK... how does it know where the database is?  (ie the host name?)

R
if you are using OleDB (I have this not clear until now), you define a connection in the Windows Control Panel, specifying URL, servername, port, etc.
This connection has a name, this is the name you use in the DataSource field.
Avatar of rmmarsh

ASKER

I'm using ODBC... give me a few days to figure this out (have to work the remainder of the week, so only work on this in my spare time)...

Thanks for your help so far...

R
Hi

I you work alot with mysql then this would might be worth to consider

http://www.crlab.com/mysqlnet/

vbturbo
Still waiting for author response...