• Hi Leute,

    ich würde gerne ein einfache Abfrage von einem Java Clint auf meinen mySQL Server durchführen. Leider er halte ich folgende Fehlermeldung. Ich bin mir jedoch sicher, dass die SQL abfrage stimmt, da ich sie in der Console des Servers einwandfrei ausführen kann.

    SQL-Statement: use Statistik; SELECT * FROM Data where Art_id = 0 and Datum = '2010-04-02';

    Fehlermeldung: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM Data where Art_id = 0 and Datum = '2010-04-02'' at line 1

    Weiß vl einer von euch wo der Fehler liegt?

    lg

  • womöglich daran, dass es nicht möglich ist 2 sql statements auf einmal durchzuführen. probier die beiden statements getrennt auszuführen.
    bzw ist es überhaupt nötig die datenbank zu wechseln? normalerweise sollte die datenbank ja schon beim erstllen der verbindung angegeben werden.

    "All through my life I've had this strange unaccountable feeling that something was going on in the world, something big, even sinister, and no one would tell me what it was."
    "No," said the old man, "that's just perfectly normal paranoia. Everyone in the Universe has that."

    😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏😐😒😓😔😖😘😚😜😞😠😡😢😣😥😨😩😪😫😭😰😱😲😳😵😶😷

  • this doesn't have anything to do with the version of mysql. the question was about java and not about perl. i dont't know about perl, but in java it is not possible to do two sql statements at once, as it would not be possible to determine which result type should be used.

    "All through my life I've had this strange unaccountable feeling that something was going on in the world, something big, even sinister, and no one would tell me what it was."
    "No," said the old man, "that's just perfectly normal paranoia. Everyone in the Universe has that."

    😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏😐😒😓😔😖😘😚😜😞😠😡😢😣😥😨😩😪😫😭😰😱😲😳😵😶😷

  • this doesn't have anything to do with the version of mysql. the question was about java and not about perl. i dont't know about perl, but in java it is not possible to do two sql statements at once, as it would not be possible to determine which result type should be used.

    :) NO , ther is relation between the versions :
    ex : if i used the ( MySQL ->v3.5) didn't Work like 5.11-- >> logical logarithmic ;
    i'm with you in can't do two SQL statements at once ,; must Be independent from the other at same time USE ...
    Good luck

    be the best like the Best Or > DIE .

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!