Autor Beitrag
eternity
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Sa 08.11.03 16:55 
Ich habe ein Problem mit den doppelten Anführungsstrichen !

DB Paradox

Als Beispiel:

a:=QuotedStr('das ist ein Text":');

Wenn ich jetzt die SQL Anweisung INSERT INTO ausführe, kommt es zur einer Fehlermeldung.

Wenn ich aber....

a:=QuotedStr('"Das ist ein Text:"') ausführe, kommt es zur keiner Fehlermeldung.

Diese Problem besteht nur, wenn ich ein Doppelpunkt einsetze.
Wie kann ich das Problem beseitigen ?

Mit freundlichen Gruß
eternity Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Sa 08.11.03 17:52 
Titel: SQL Problem
Ich glaube ich habe da ne möglichkeit gefunden:

Query.Close;
Query.SQL.Text:='INSERT INTO "Tabelle" (Feld1,Feld2) VALUES (:Feld1,:Feld2)';
Query.Params[0].AsInteger:=Feld1;
Query.Params[1].AsString:=Feld2;
Query.ExecSQL;


Soweit funktioniert es !
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 09.11.03 02:37 
Der : leitet einen Parameter ein !!

_________________
Gruß
Hansa