In at the deep end

Hi all.

Im trying to put together a C++ front end to a MSSQL database. The database for the most part is already structured, some in the server, some on paper and some in my head.

I decided Visual C++ would be a good move for me as the programming lanuages I trained in are somewhat outdated (remember Modula2 anyone?) so it's an opportunity for me to get back in the swing of things.

While I'm making my way through my Visual C++ primer book, I really need to get my teeth into something which will make use of the SQL database but there seem to be an awful lot of methods to use to link to it and no real hints anywhere or even sample code for a methodology to use.

Ideally I want to be learning something that is a current method rather than something that has already seen it's day and I learn best by example.

Could anyone point me in the right direction please?

Cheers
I think the most common way to do db access on windows (assuming windows from mssql) is through ado .net, but .net integration with c++ is not the simplest thing to do. Was there a reason you chose c++ over a .net language, as neither GUI/front end building nor db interfaces are c++'s strong points.
Hi Kev thanks for the response.

The reason I chose C++ was that as well as producing this one database, I wanted to learn a language that would be equally useful for other projects as required, and also if I were to learn it the move to things such as .net languages would be easier.

I suspect I've made a rod for my own back here, is there perhaps a more appropriate language for this (it's a simple supplier/customer db with a bit of stock & job management, I know what I need just need to sort a front end, forms etc.)
I certainly don't think c++ will make migration to a .net language easy. For what it sounds like you want to do, I would definitely start with a .net language. As for recommending one, I'm a bit out of my depth too. As I only know of c# and vb, and don't know enough about vb to compare them.
You can use C++ and SQL. At the end it's just sending and receiving strings.

Maybe this is nice:
http://www.sqlapi.com/

You can use VB or C#. They offer more convenience when it comes to handling the data (like automatically filling GUI-Elements), but i figured that you never get the whole thing and doing it by hand is often easier.
I'd second C# for front-end work. I'm not sure how it is for DB interactions, but it's a fairly nice and easy language, so I'd imagine it'd be ok.

It's not that C++ isn't good for front-end development or anything, I just think C# does it with much less hassle. </opinion>
Topic archived. No new replies allowed.