Solved

How to access a MySQL database on an internet server?

Posted on 2007-11-26
12
216 Views
Last Modified: 2012-05-05
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?  
0
Comment
Question by:rmmarsh
  • 5
  • 5
12 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20354270
That's depend on the library you have choosen to access the MySql server. Have a look to:
http://www.connectionstrings.com/?carrier=mysql
0
 

Author Comment

by:rmmarsh
ID: 20354360
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?
0
 

Author Comment

by:rmmarsh
ID: 20354364
s/b Visual Web Developer 2005 *Express*
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354397
I mean, the mysql connection type: ODBC, OleDB, which have you selected?
The link I have posted give you connection string for all possibilities.
0
 

Author Comment

by:rmmarsh
ID: 20354410
Yes, it did... I guess I'll just pick one and see what happens... what do I put in the slot for "provider"?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354457
in OleDB should be MySQLProv as shown.
0
 

Author Comment

by:rmmarsh
ID: 20354466
OK... how does it know where the database is?  (ie the host name?)

R
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354530
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.
0
 

Author Comment

by:rmmarsh
ID: 20354561
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
0
 
LVL 18

Expert Comment

by:vbturbo
ID: 20356136
Hi

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

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

vbturbo
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20552830
Still waiting for author response...
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now