Game Development Community

ODBC resource woes

by Jonathon Stevens · in Torque Game Engine · 02/06/2006 (8:50 pm) · 1 replies

Friends,

I'm using OneST8's ODBC resource. I'm having a strange issue. Sometimes, when doing a DB:Select if it doesn't find any records to return, it's still returning stuff. For instance I have a table that has a field Name in it. I do the following:

%result = DB::Select( "*", "accounts", "Name = \'" @ %AccountName @ "\' AND password = \'" @ getStringCRC(%AccountPassword) @ "\'");
      
      if(%result.Name !$= "")
      {
         //some crap here
      }
      else
      {
            //some crap here
      }

Now, sometimes when I KNOW it doesn't return any records, the $result.Name will = "°×Y" and other junk like that. Any thoughts?

dish

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.


#1
02/07/2006 (2:41 am)
Is it a problem with reserveword table/column names? I would try changing the column name to something more specific, like PlayerName, and checking the results.