Mysql Odbc Resource
by Jonathon Stevens · in Torque Game Engine · 01/29/2006 (8:34 pm) · 4 replies
Well, I got the TGE Mac/Lin/Win MySQL ODBC resource working found at www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7890. I can connect to a MySQL db and do all kinds of fun SQL commands on it.
I've attempted to port it over to SQL Server 2005 and when I'm trying to connect, I'm getting the following in my console.log:
It appears that it's connecting succesfully, however it's a 'SQL_SUCCESS_WITH_INFO' and for one reason or another, the ODBC resource doesn't allow the db access to take place if it doesn't get a plain 'SQL_SUCCESS'. If it has info, does that mean it's bad info? From what I'm reading, it doesn't seem like those are issues, but rather just some information.
Thoughts?
I've attempted to port it over to SQL Server 2005 and when I'm trying to connect, I'm getting the following in my console.log:
Compiling starter.rpg/server/scripts/db/init.cs... Loading compiled script starter.rpg/server/scripts/db/init.cs. ******************************************************************************* ***** Initializing the database... ***** Using ODBC Driver: SQL Native Client DatabaseConnection::Connect - SQL Feedback - state(01000):errRow(1):native(5701) - [Microsoft][SQL Native Client][SQL Server]Changed database context to 'starter_rpg'. DatabaseConnection::Connect - SQL Feedback - state(01000):errRow(2):native(5703) - [Microsoft][SQL Native Client][SQL Server]Changed language setting to us_english. DatabaseConnection::Connect - SQL Feedback - state(01000):errRow(3):native(5703) ***** Database feedback received while trying to connect to database. ***** End of database initialization. *******************************************************************************
It appears that it's connecting succesfully, however it's a 'SQL_SUCCESS_WITH_INFO' and for one reason or another, the ODBC resource doesn't allow the db access to take place if it doesn't get a plain 'SQL_SUCCESS'. If it has info, does that mean it's bad info? From what I'm reading, it doesn't seem like those are issues, but rather just some information.
Thoughts?
About the author
With a few casual games under his belt as CEO of Last Straw Productions, Jonathon created the increasingly popular Indie MMO Game Developers Conference which. Following the success of IMGDC a new MMOG fan event called LFG Expo will debut in June of 2010.
#2
Driver={SQL Native Client};Server=Aron1;Database=pubs;UID=sa;PWD=asdasd;
which is straight from connectionstrings.com
It doesn't ERROR, it's just sending messages back. For instance, when I modified the scripts to go ahead and initalize the utils.cs db functions, it works fine and I'm able to run any T-SQL I want and it works great. It's just annoying to get those messages back and the original code doesn't allow for you to continue if you get a success with messages. I'm wondering why it doesn't allow you to move forward when it's succesfull? Was their something that I'm not thinking about that would make me want to NOT proceed when I get this?
01/31/2006 (9:44 am)
My connection string is in the following format:Driver={SQL Native Client};Server=Aron1;Database=pubs;UID=sa;PWD=asdasd;
which is straight from connectionstrings.com
It doesn't ERROR, it's just sending messages back. For instance, when I modified the scripts to go ahead and initalize the utils.cs db functions, it works fine and I'm able to run any T-SQL I want and it works great. It's just annoying to get those messages back and the original code doesn't allow for you to continue if you get a success with messages. I'm wondering why it doesn't allow you to move forward when it's succesfull? Was their something that I'm not thinking about that would make me want to NOT proceed when I get this?
#3
01/31/2006 (10:35 am)
Just implement a way to handle these messages. Most resources aren't going to do everything for you, but serve as a basis for you moving on to implement that functionality that is important to you!
#4
01/31/2006 (11:08 am)
I understand that and I did get the code to work (that resource doesn't even allow for use of sql server out of box) however what my question is, is WHY it was designed that way to begin with. Should I NOT let the database be accessable if it sends status messages back? Those status messages don't seem harmeful in anyway. They aren't WARNINGS, simply responses from sql server.
Torque 3D Owner Dave Young
Dave Young Games
Did you try putting those key value pairs in the connection string to stop the extra info from returning? it seems like you might have one or more of the keys wrong, forcing the connection to make assumptions.