| To: | REALbasic NUG Italian <realbasic-nug dot it at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Apici e affini |
| From: | Gilberto De Faveri <gilberto dot defaveri at omnidea dot it> |
| Date: | Mon, 14 Jan 2008 23:30:23 +0100 |
| Delivered-to: | listarchive at realsoftware dot com |
| Delivered-to: | realbasic-nug dot it at lists dot realsoftware dot com |
| References: | <110EC1C5-6220-4B1E-A084-4C810D6DE572 at tin dot it><D75ADE74-45DF-46D3-9D8A-C2EA416BA534 at cantoberon dot it><8E3AD366-8CF5-4E05-B525-E3327CDF0E52 at tin dot it> <F4E1E804-7FA9-47B5-B48C-C1F76E4B86F3 at cantoberon dot it> <005301c856ef$83196070$6801a8c0 at IMAC> <470C388B-CB38-42A7-8B6B-EA14C1FFF62D at yahoo dot it> <008f01c856fb$7ac26780$6801a8c0 at IMAC> |
Devi farne l'escape, sostituendo '' a ' all'interno della query.Può risultare comodo scrivere una funzione o estendere la classe String con una funzione che lo faccia per te:
Funcion SQLSafe(Extends str As String) As String
Return str.ReplaceAll("'", "''")
End Function
In questo modo, una volta creata una stringa contenente la query
potrai utilizzare qualcosa del tipo
DB.SQLExecute(query.SQLSafe())P.S.: Non rispondere a vecchi thread cambiando l'oggetto. Crea una nuova mail per ogni nuovo problema. On 14/gen/08, at 23:19, Enrico a Libero wrote: Opss mi sa che si è perso una parte del messaggio, in sostanza vorrei poter usare gli apici nelle select, se faccio una select con un campo che ne contiene uno mi va in errore. -- gilberto de faveri omnidea srl edificio pegaso parco scientifico tecnologico vega via delle industrie, 15 30175 venezia marghera tel +39 041 509 3441 fax +39 041 509 3641 www.omnidea.it |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Drag and Drop, BluStar |
|---|---|
| Next by Date: | Re: Apici e affini, Massimo Valle |
| Previous by Thread: | Re: Apici e affini, Marco Bambini |
| Next by Thread: | IMAGEWELL, Enrico a Libero |
| Indexes: | [Date] [Thread] [Top] [All Lists] |