Connect to a mysql database

I'm gonna makea client that connect to a mysql database and retrieve informations. I don't need to write in it. I'm gonna make this in visual studio net, using visual c. I need the script that connect to database. Can anyone post an example or give me some tutorial links ?
-Mihai-Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

D_M_DCommented:
bhagyeshtCommented:
use ODBC driver for mysql then  use CDatabase and CRecordset.

ODBC driver can be downloaded from the Mysql site
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

-Mihai-Author Commented:
I will do the program in visual .net . will be a windows application.
i know about mysql++ but i found only a version for visual c++ 6.0 and its full with bugs.
I need something simple but fast and stable. I'm gonna make a client like yahoo messenger that connect to a site database and retrive new News, articles and downloads.

So any better way ?
bhagyeshtCommented:
-Mihai-: fire a http request from your page to a server. let that server contain the Mysql connection maybe ASP or PHP. and the response of that http should be ur data. this is much better compared to opening the database from n number of places directly
-Mihai-Author Commented:
and how should i do that ?
bhagyeshtCommented:
u can use an activex control inet to achieve this
some example at
http://www.optimus.lt/pages/produktai/05/Online/development/cd_activex_inetget.htm
-Mihai-Author Commented:
hmm. lets see that i want my program to connect to www.gamespot.com and to tell me the last 3 pc game news and the last 3 pc screenshots. anyone can help me with an example ?
bhagyeshtCommented:
what are the html pages which contain that information?
bhagyeshtCommented:
you can embed inet control in ur vc applicationa and call the openurl method this will return you the complete HTML of that page. Parse it and get ur information
-Mihai-Author Commented:
Can you give me some examples and/or tutorial links?
bhagyeshtCommented:
or search in google for inet sample download you will get lots of links
-Mihai-Author Commented:
i really can't find something usefull ..
bhagyeshtCommented:
in vc add internet transfer control on a dialog. run the class wizard to make a wrapper around the class. once u have done that create an object of the class and call the openurl method passing the webpage's address the return type of that method is a string containing the webpage's contents. you can find vb samples in msdn too. just convert it to corresponding vc.
-Mihai-Author Commented:
well. i need it in vc and i never worked with vb. can you do a simple example please ?
bhagyeshtCommented:
the procedure i wrote is of VC and the example mentioned is in vb.
-Mihai-Author Commented:
well, can you give me a simple example.
bhagyeshtCommented:
-Mihai- : I guess I have provided enough links and said that the example is in VB Its fairly simple to understand and besides I wrote down what you need to do in case of VC. Please try if you are stuck post the code I shall assist you.
-Mihai-Author Commented:
All you gaved me was in VB . I never worked in that stupid language so it's preaty hard for me to modify it for VC. I just need a simple example that open a page and retrive something from it.
bhagyeshtCommented:
post your email id i shall send across a sample application

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
-Mihai-Author Commented:
raven@pixelrage.ro

Thanks !
-Mihai-Author Commented:
bhagyesht can you send me that aplication again ? I haven't received it yet, don't know why :(
bhagyeshtCommented:
not recieved? I had send in in dec end from my previous co. I will write it again and send it.
Bhagyesh Trivedi
bhagyeshtCommented:
I have uploaded the code at
http://www34.brinkster.com/bhagyesht/
Bhagyesh Trivedi
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.