June 29th, 2006, 06:16 PM
Url and sql
I am making a program that downloads a web page. It then take the info and puts it into an SQL database.
I have never worked with URLs or SQL in c++ can someone point to what library they use to do this. I should be able to get it from there.
Thank you for any help.
Last edited by mshiznitzh; June 29th, 2006 at 06:19 PM.
June 29th, 2006, 07:34 PM
Assuming you are using Windows:
WinINet HTTP tutorial with example code
I've never used either of those so I can't speak for or against them.
Assuming you are using MySQL, visit their web site and download it, it comes with a C SDK. You may also want to hit up the MSDN site and search for ODBC or whatever if you are using a database with an ODBC driver.
You may also want to consider Java as an alternative, you may like some of the APIs better (see URL for HTTP resource retrieval, ParserDelegator for HTML parsing, and a bunch of classes I can't remember for JDBC development).
OMG RAVER CHICKS!!
On a related note: C/C++ Programming Tutorials
"Science is based on reality staying the same, and Nature ignores what humans vote upon." -- Bill Beaty
"Three litres of sherry up the butt can only be described as astounding." -- Darwin Awards
June 29th, 2006, 07:44 PM
Thanks, I will check these out. I haven't used java much is the only reason I didn't choose it. I think I have my function to get the things out of the page I need so I think I will just stick to c++ for now. Maybe after I am done I will try and make a Java version to learn it and see what one I like better.
Originally Posted by peenie
June 29th, 2006, 08:20 PM
If you're using C++ Builder, there are a bunch of components that make this a breeze. There's a HTTP component to fetch a page and ADODatabase/ADOQuery components to do the DB manipulation.
On VC++, you could consider using the MFC classes as well (CHttpConnection and ADO via active-X)
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo