Autor Beitrag
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Sa 23.04.05 12:53 
Hallo,
also ich bin dabei ein Programm zu schreiben, dass mir alle IP-Adressen in meinem Netzwerk in eine MySQL DB schreibt. Ich greife auf die DB mit odbc zu und verwende daher die BDE. Mein Problem, ich rufe meine Tabelle mit einem TQuery auf:
ausblenden Delphi-Quelltext
1:
query1.sql.text:='SELECT inet_ntoa(IP) AS IP, DNS from computer';					


Das TQuery ist auf Chachedupdate und Requestlive auf true, so wie ich es in einem Buch gelesen habe. Unter Updateobject steht das UpdateSQL1 drinnen. Das UpdateSQL hat beim Modify folgenden SQL-Syntax:
ausblenden Delphi-Quelltext
1:
updatesql1.modifysql.text:='UPDATE computer SET IP = inet_aton(:IP) , DNS = :DNS WHERE IP = :OLD_IP';					


Wenn ich jetzt einen Datensatz bearbeite und auf meinen Button1 klicke:
ausblenden Delphi-Quelltext
1:
query1.applyupdates;					


Dann kommt jedes mal die sehr ungenaue Fehlermeldung "Aktualisierung misslungen". Da leider kein Grund angegeben ist, hab ich keine Ahnung, was ich falsch mache. An fehlenden Rechten kann es nicht liegen, denn ich bin root.

Kann mir jemand helfen, bitte, bin am Verzweifeln!!!

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
Hansi@OMG Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: So 24.04.05 12:09 
Komisch, heute morgen habe ich das Programm neu kompiliert, auf einmal funktioniert es.
Mysterium BDE?

Trotzdem danke, an alle, die sich das Posting gelesen haben.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: So 07.05.06 18:27 
Ich bekomme die Medlung nicht weg. Auf einer Form gehts auf einer anderen nicht Alle Einstellungen im OI bei beiden Querys sind gleich. Wie bekomme ich das nun weg?

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.
Hansi@OMG Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: So 07.05.06 19:35 
Ich geb dir einen guten Rat, nachdem ich so viele Probleme mit ODBC und den BDE hatte bin ich vollkommen auf Zeos umgestiegen und die funktionieren auch!

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: So 07.05.06 20:10 
Werde ich mir angucken. Momentan muss es aber BDE sein. Der Auftraggeber will BDE und er will blad :lol:


//Edit:
Probelm erkannt! Alle Felder welche via SQLUpdate "updaten" dürfen nicht '' sein !!

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.