Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ironica

VC++ 2003 and mysql++

This topic is 5655 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys. I can''t seem to get mysql++ working under VC++.NET 2003. I''m just trying to write the most basic mysql program. I''ve downloaded the user-submitted version of mysql++ for VC++ 6. I kept getting errors about line 115 of mysql_com.h: my_socket fd; /* For Perl DBI/dbd */ So I just commented it, and it now compiles fine. Had no problems with linking, which I expected. Then it wants the libmySQL.dll to run. Ok, copied that to the same directory. But now it just won''t connect to the SQL server. Other programs can connect, so it definately works. The call to: mysql_real_connect(&mysql, host, user, pass, db, 0, NULL, 0); returns false. mysql_error(&mysql); returns: Can''t connect to MySQL server on ''127.0.0.1'' <10061> But I have other programs that can connect to the SQL server. I''m using Microsoft SQL Server 2000 on Windows, does that matter? It just occured to me that the Microsoft server might run on a different port. Listening on port 1433, hmm... What port does the MySQL server run on? 10061 is an error number, not the port, right? I feel like kicking myself for not thinking of the ports sooner >.< Anyone know what''s up with this? Sounds like the cause is me being dumb, hehe.

Share this post


Link to post
Share on other sites
Advertisement
We ended up using MyODBC in C#... dunno if this will help or anything, but here''s our connection string:


"DRIVER={MySQL ODBC 3.51 Driver};Server=192.168.1.1;Database=Tournament;Uid=username;Pwd=password;"


"Tournament" is the name of our database, clearly.

Share this post


Link to post
Share on other sites
Hehe, never mind. It was just me being dumb. I always assumed the Microsoft SQL Server was just Microsoft''s version of MySQL, and it worked exactly the same and everything. I did want to be able to use Microsoft''s server, but doesn''t matter, MySQL works as I wanted.

I guess Microsoft have their own version of sql++ too then, which is for connecting to Microsoft SQL Server? Ah well, not bothered. No point in checking, when I have MySQL working perfectly.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!