Author Topic: Need Help With SQL and C++  (Read 2432 times)

0 Members and 1 Guest are viewing this topic.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Need Help With SQL and C++
« 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?
I cry every time I see that I am not a respected member of this community.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Need Help With SQL and C++
« Reply #1 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: Need Help With SQL and C++
« Reply #2 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.
I cry every time I see that I am not a respected member of this community.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Need Help With SQL and C++
« Reply #3 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 to help me with SQL and it's very good. Check it out.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Need Help With SQL and C++
« Reply #4 on: February 12, 2012, 06:03:40 PM »
Even though it's sometimes sqlite-specific, I usually use this for SQL reference, 'cuz I love railroad diagrams.

@Hellfox, you need a connector library in C++ for whatever flavor of SQL you're using.
Experiencing God's grace one day at a time.