![]() |
Datenbank: MySQL • Version: 5.0.15 • Zugriff über: MySQL-C-API (libmySQL.dll)
MySQL liefert keine Results
Hallo!
Ich habe mir gerade Chewies ![]() Mein Code:
Delphi-Quellcode:
Verbindung besteht, da sonst ein Fehler kommen würde (habe ich geteste). mysql_error liefert auch nichts. mysql_num_rows liefert immer 0. Daten befinden sich in der DB.
var
Query: PChar; _myRes: PMySQL_Res; _myRow: PMySQL_Row; begin // Select db. mysql_select_db(_myCon, MySqlLoginInfo.Database); // Get login information Query := PChar('SELECT * FROM users'); // Execute query mysql_real_query(_myCon, Query, Length(Query)); // Store result _myRes := mysql_store_result(_myCon); if _myRes = nil then begin MessageBox(0, PChar('Could not obtain data from server:' + #10 + mysql_error(_myCon)), 'Warning', MB_OK or MB_ICONWARNING); end; if mysql_num_rows(_myRes) > 0 then begin // Fetch result _myRow := mysql_fetch_row(_myRes); // Set variables StrPCopy(AInfo.Username, _myRow[0]); StrPCopy(AInfo.GroupName, _myRow[1]); StrPCopy(AInfo.RootDir, _myRow[2]); StrPCopy(AInfo.HomeDir, _myRow[3]); // Free result mysql_free_result(_myRes); Result := True; end else begin Result := False; end; end; Grüße Faux |
Re: MySQL liefert keine Results
Liefert mysql_num_rows nur 0 oder ist die Ergebnismenge wirklich leer?
|
Re: MySQL liefert keine Results
Zitat:
Okay. Habe es gelöst. Es lag an einer alten libmySQL.dll. Grüße Faux |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:14 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz