Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi SQL String Formatieren (https://www.delphipraxis.net/3983-sql-string-formatieren.html)

Gast 10. Apr 2003 08:48


SQL String Formatieren
 
Hallo 8)

Hat jemand vielleicht eine gute Funktion geschrieben um String SQL-Gerecht zu Formatieren...

also s := xSQLFormat(s);

Es geht hier um eine Funktion die ein String s so formatiert das er für ein direkter SQL-Befehl... wie z.B:

UPDATE KUNDE SET BESCHREIBUNG = ' + s

bereitgestellt wird...

Meine Funktion... die ich bis jetzt genutzt habe versagt bei solchem String (für Ms-SQL 2000):


'{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Book Antiqua;}{\f1\fnil Frutiger Roman;}}'#$D#$A'\viewkind4\uc1\pard\lang1031\f0\fs 24 Plasplay 40"'#$D#$A'Pion PP-V2E'#$D#$A'Bild 4:3\par'#$D#$A'\f1\fs20\par'#$D#$A'}'#$D#$A#0


Gruß

Paul Jr.

Sharky 10. Apr 2003 11:47

Re: SQL String Formatieren
 
Zitat:

Zitat von Paul Jr.
....
Es geht hier um eine Funktion die ein String s so formatiert das er für ein direkter SQL-Befehl... wie z.B:

UPDATE KUNDE SET BESCHREIBUNG = ' + s

bereitgestellt wird...

Hai Paul,

was meinst Du denn mit "für SQL-Formatiert"??

In deinem Beispiel würde doch ein:

Delphi-Quellcode:
'UPDATE KUNDE SET BESCHREIBUNG = ' + QuotedStr (s)
reichen oder?

Gast 10. Apr 2003 12:42

Danke Sharky 8)

Gruß

Paul Jr.


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:17 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz