Problem with Dbmysql
BlitzMax Forums/Brucey's Modules/Problem with Dbmysql
| ||
I am having some problems with retrieving a record from the database. when ever i run this bit of code here query = ServerDB.executeQuery("SELECT * from members") If ServerDB.hasError() Then errorAndClose(ServerDB) Notify "Database Error Check password, had to close!" End If While query.nextRow() record = query.rowRecord() DebugLog "Did find a record!" Print "Name = " + record.getString(1) Wend All the records are blank, i've even checked every index. Also I noticed record.value(1) always returns null no matter what index i use. Last edited 2010 |
| ||
To out rule it's a problem with the MySQL driver do a quick test on a SQLite database. If that fails as well it's probably your code. I haven't used bah.database for a long time so I can't verify it for you though. |
| ||
Kind of weird because it returns the correct number of rows, and it also returns the correct column names for the table howerver all the values are NULL |
| ||
Having the same problem here.. |
| ||
I just installed libmysql.dll from MySQL connector 6.0.2 and connected to an xampp install of MySQL 5.5.8 on Windows. Created a database called maxtest, and a user brucey with password brucey, and ran all the test apps. They all worked correctly, and returned the expected values. What client/server versions are you running against? |
| ||
Have the same problem using MySQL connectors 6.0.2 dll and MySQL 5.1.49 also from a xampp install i cannot get the values, number of rows is correct. blob_test.bmx error:--> DebugLog:(3) Error resetting statement (4068) tableinfo.bmx error:--> Fieldnames not returned but Field count is ok. test_01.bmx error: line-->[ DebugLog TDBDateTime(record.value(3)).format() ] unhandled exception Attempt access field or method of null object test_02.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_03.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_04.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_05.bmx no errors Last edited 2011 |
| ||
I have pretty much the same Mysql Server version: 5.5.16 from xampp test_01.bmx works fine test_02.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_03.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_04.bmx error: --> DebugLog:(3) Error resetting statement (4068) test_05.bmx no errors windows 7 Intel Core2quad 2.5 ghz |