You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

htillmann

Beginner

  • "htillmann" is male
  • "htillmann" started this thread

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

1

Monday, March 2nd 2009, 11:20pm

Update auf Mysql DB

Hi zusammen,
Weiß jemand wie ich ich ein Update auf eine MySql DB machen kann?

Mit

Jabaco Source

1
Database1.ExecuteStaement("Update test set Name='hugo'  where ID=1")


klappt es nicht.

Fehlermeldung:

"java.sql.SQLException: Can not issue data manipulation statements with executeQuery()"

An der DB liegt es nicht, wenn ich mit sql drauf gehe klappen alle updates.

Ich bin in Java nicht so firm, als das ich das jetzt auf Anhieb hin bekäme.

Gruß



Hubertus

htillmann

Beginner

  • "htillmann" is male
  • "htillmann" started this thread

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

2

Tuesday, March 3rd 2009, 5:22pm

MySql Datenmanipulation

Hi zusammen,

auch mit einer "Stored Procedure" bekomme ich ein Fehlermeldung:
Für einen kurzfristigen Hinweis freue ich mich.

Exception in thread "AWT-EventQueue-0" java.sql.SQLException: PROCEDURE test.updLastEntry can't return a result set in the given context

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

3

Wednesday, March 4th 2009, 12:40am

Quoted

"java.sql.SQLException: Can not issue data manipulation statements with executeQuery()"
das funktioniert mit "java.sql.execute". momentan ist nur "executeQuery" implementiert. das nächste framework-update wird dieses problem beheben - alternativ könntest du dein framework auch direkt modifizieren => JabacoFramework/VB/Database (Sourceforge)

htillmann

Beginner

  • "htillmann" is male
  • "htillmann" started this thread

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

4

Thursday, March 5th 2009, 10:13am

Hallo Manuel,

danke für den Hinweis, dann werde ich mich mal in die Tiefen des Frameworks begeben.
Wenn ich zu einem Ergebnis gekommen bin, gebe ich Bescheid.

Gruß

Hubertus

htillmann

Beginner

  • "htillmann" is male
  • "htillmann" started this thread

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

5

Thursday, March 5th 2009, 11:18am

Hi Manuel,

habe die Databaseklasse ergänzt:

Jabaco Source

1
2
3
4
Public Function ExecuteUpdate(sql As String) As Integer
   Dim myStmt As java#sql#Statement = myCon.createStatement()
   ExecuteUpdate = myStmt.executeUpdate(sql)
End Function

Wenn ich das Framework kompiliere läuft der Bearbeitungsbalken nicht durch und die Sanduhr bleibt.
Das Jar Archiv ist erstellt, aber kleiner als das original. Die kompilierte Databaseklasse ist aber immer noch gleich gross und die neue Funktion ist nicht zu sehen. Im Temp-Verzeichnis steht aber die korrekt kompilierte Databaseklasse mit den Änderungen.
Wo habe ich den Knoten im Hirn? ?(

Danke
Hubertus

This post has been edited 1 times, last edit by "htillmann" (Mar 5th 2009, 11:54am)


htillmann

Beginner

  • "htillmann" is male
  • "htillmann" started this thread

Posts: 30

Date of registration: Feb 25th 2009

Location: Beverungen / Weser

Occupation: Softwareentwicklung

  • Send private message

6

Thursday, March 5th 2009, 12:11pm

So, update hat funktioniert.

Ich habe die kompilierte Databaseklasse mit der Hand in das Jar-Archiv kopiert.
Nun klappt das Update so wie ich mir das gewünscht habe.
Die Sache mit dem Kompilieren kannst Du ja nochmal verfolgen.
Bin ich eigentlich der einzige, bei dem das auftritt oder haben auch noch andere Ähnliches festgestellt?
Im Forum habe ich nichts derartiges gefunden. Wenn Du zusätzliche Informationen brauchst, kein Problem.

Gruß

Hubertus

Rate this thread
WoltLab Burning Board