Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 29.01.07 19:30 
Hi, Delpher,

wie geht der folgende SQL-Befehl richtig:

ausblenden Delphi-Quelltext
1:
2:
InputString := format('select * from "%s" B ' +
                      'where B.Name like ''F%'' order by B.Name', [TbBuch.tablename]);


Bisher habe ich dabei einen Fehler, er stört sich an Like.

Danke für eure Hilfe,
Detlef
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Mo 29.01.07 19:47 
Meine Glaskugel ist schon wieder defekt...

Welche Datenbank? Und was heisst "[...] stört sich an Like [...]"? Gibt es eine Fehlermeldung?
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 29.01.07 20:19 
Hi, Robert,

hast ja recht... Es ist eine DBase-Datenbank(Tabelle), es gibt eine Fehlermeldung:
Kein Argument für '%''

jetzt 'ne Ahnung?

Gruß, Detlef

Hab' den Fehler gefunden!
Es muss heißen:

ausblenden Delphi-Quelltext
1:
2:
InputString := format('select * from "%s" B ' +  
                  'where B.Name like "%s" order by B.Name', [TbBuch.tablename, 'F%']);