Ulysses

General => Developers Corner => Topic started by: LuaTenshi on January 29, 2012, 08:00:03 PM

Title: Need Help With SQL and C++
Post by: LuaTenshi on January 29, 2012, 08:00:03 PM
How do I get C++ working with SQL.

As in I would like to make a log-in system where one can log-in through a C++ program and then it will go through the net check a SQL data base and if the account is valid, it will let them into the program?
Title: Re: Need Help With SQL and C++
Post by: JamminR on January 29, 2012, 08:39:57 PM
First, please understand I don't know how to program in C<anything>, nor do I know SQL construct/queries.
Second, the geek scripting coding person I am would presume the following.
Write C++ app that opens sockets, sends text strings to specific SQL db port in SQL query format.
C++ app will expect response, keep socket open listening for that response.
As always in all languages, give reasonable timeout time in case db isn't responding.

The above is extremely simplified, but should at least give start to ideas.
Title: Re: Need Help With SQL and C++
Post by: LuaTenshi on January 30, 2012, 10:10:21 PM
I guess this was moved to the developers corner, so in short I want to say, for people who where/are confused like I was. Any thing that's about development can be posted here it does not have to be LUA.
Title: Re: Need Help With SQL and C++
Post by: MrPresident on February 01, 2012, 11:02:36 PM
You'll likely need to install/include the MySQL connector into your C++ application. C++ is one of the languages I know nothing about so I can't help you there.. but MySQL queries I am fairly fluent in.

I use THIS SITE (http://www.w3schools.com/sql/sql_quickref.asp) to help me with SQL and it's very good. Check it out.
Title: Re: Need Help With SQL and C++
Post by: Megiddo on February 12, 2012, 06:03:40 PM
Even though it's sometimes sqlite-specific, I usually use this (http://sqlite.org/lang.html) for SQL reference, 'cuz I love railroad diagrams.

@Hellfox, you need a connector library in C++ for whatever flavor of SQL you're using.