AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi InterBase 2009, UTF8 und dbExpress
Thema durchsuchen
Ansicht
Themen-Optionen

InterBase 2009, UTF8 und dbExpress

Ein Thema von mjustin · begonnen am 17. Mai 2010
Antwort Antwort
mjustin

Registriert seit: 14. Apr 2008
3.004 Beiträge
 
Delphi 2009 Professional
 
#1

InterBase 2009, UTF8 und dbExpress

  Alt 17. Mai 2010, 11:39
Datenbank: InterBase • Version: 2009 • Zugriff über: dbExpress
Hallo,

hat hier eventuell schon jemand Erfahrung mit dieser Kombination (InterBase 2009, UTF8 und dbExpress)?

Es gibt beim Ausführen eines Updates über diese Komponenten

SQLConnection -> SQLQuery -> DataSetProvider -> ClientDataSet -> DataSource -> DBEdit

den Fehler "Datensatz nicht gefunden oder von einem anderen Benutzer geändert"

Ein direktes Update über eine TSQLQuery dagegen funktioniert.

Der Delphi - Code besteht aus zwei Button-OnClick Handlern

Delphi-Quellcode:
ClientDataSet1.Open;
ClientDataSet1.Edit;
und

Delphi-Quellcode:
ClientDataSet1.Post;
ClientDataSet1.ApplyUpdates(-1);
sowie dem OnReconcile Handler

Delphi-Quellcode:
procedure TMainForm.ClientDataSet1ReconcileError(DataSet: TCustomClientDataSet;
  E: EReconcileError; UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
  ShowMessage('Reconcile ' + E.Message);
end;
Update: anscheinend bin ich auf einen alten Bug gestossen, der in Delphi 2010 Update 4 endlich gefixt ist:

http://qc.embarcadero.com/wc/qcmain.aspx?d=71984

Zitat:
When I pull some data into a TClientDataset using a Provider with UpdateMode := upWhereAll, and then i apply updates to a changed record: If some of the string fields in the record being updated are blank (but not null) I get "Record not found or changed by another user" because the update statement is sending `where myStringField is null` instead of `where myStringField = ""`
Der Fehler ist mit WIN1252 Feldern jedoch nicht aufgetreten, fragt mich nicht warum ...

Nachtrag:

Statt zwei Quotes

BindText := '(' + BindTextField + ' is null or ' + BindTextField + ' = "") and'; // <-- Quotes you use will depend on your SQL server. für InterBase mit 4 Apostroph:

BindText := '(' + BindTextField + ' is null or ' + BindTextField + ' = '''') and'; // <-- Quotes you use will depend on your SQL server.
Michael Justin
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz