|
Prev: Senior Moment re Location of Forms
Next: copy table
From: nico on 12 Jun 2008 10:35 salve, quando faccio una ricerca su di un db Set db3 = db2.OpenRecordset("select * from anagrafe where cognome like '*" & (txtcognome.Text) & "*' order by nome") e il nome � con l'apostrofo, non lo trova, quando digito il nome inserisco due volte l'apice, la ricerca funziona benissimo. d'angelo (non lo trovo) d''angelo (lo torva). come posso fare grazie nico.
From: Jan Hyde (VB MVP) on 12 Jun 2008 11:19 "nico" <galadomenico(a)tin.it>'s wild thoughts were released on Thu, 12 Jun 2008 16:35:39 +0200 bearing the following fruit: >salve, > >quando faccio una ricerca su di un db >Set db3 = db2.OpenRecordset("select * from anagrafe where cognome like '*" & >(txtcognome.Text) & "*' order by nome") >e il nome � con l'apostrofo, non lo trova, quando digito il nome inserisco >due volte l'apice, la ricerca funziona benissimo. > >d'angelo (non lo trovo) >d''angelo (lo torva). > >come posso fare > >grazie nico. > I don't speak the language you posted in, but I'd hazard a guess you need to use % instead of * -- Jan Hyde https://mvp.support.microsoft.com/profile/Jan.Hyde
From: Auric__ on 12 Jun 2008 14:55 On Thu, 12 Jun 2008 15:19:59 GMT, Jan Hyde (VB MVP) wrote: > "nico" <galadomenico(a)tin.it>'s wild thoughts were released > on Thu, 12 Jun 2008 16:35:39 +0200 bearing the following > fruit: > >>salve, >> >>quando faccio una ricerca su di un db >>Set db3 = db2.OpenRecordset("select * from anagrafe where cognome >>like '*" & (txtcognome.Text) & "*' order by nome") >>e il nome � con l'apostrofo, non lo trova, quando digito il nome >>inserisco due volte l'apice, la ricerca funziona benissimo. >> >>d'angelo (non lo trovo) >>d''angelo (lo torva). >> >>come posso fare >> >>grazie nico. >> > > I don't speak the language you posted in, but I'd hazard a > guess you need to use % instead of * That's Italian. Here's my translation: ----- Subject: search with apostrophe Hi, When I do a search on a database Set db3 = db2.OpenRecordset("select * from anagrafe where cognome like '*" & (txtcognome.Text) & "*' order by nome") If the name has an apostrophe, it's not found, but when I enter the name with two apostrophes, the search works fine. d'angelo (not found) d''angelo (found) How can I do this? Thanks, Nico. ----- I don't do SQL, but I'd guess (*GUESS*!) that perhaps the apostrophe needs to be escaped in the exact manner that he's doing, and he is unaware of such a requirement. -- - Can we kill him now? - Say, could you put a muzzle on him?
From: Jan Hyde (VB MVP) on 13 Jun 2008 03:53 "Auric__" <not.my.real(a)email.address>'s wild thoughts were released on Thu, 12 Jun 2008 18:55:50 +0000 (UTC) bearing the following fruit: >On Thu, 12 Jun 2008 15:19:59 GMT, Jan Hyde (VB MVP) wrote: > >> "nico" <galadomenico(a)tin.it>'s wild thoughts were released >> on Thu, 12 Jun 2008 16:35:39 +0200 bearing the following >> fruit: >> >>>salve, >>> >>>quando faccio una ricerca su di un db >>>Set db3 = db2.OpenRecordset("select * from anagrafe where cognome >>>like '*" & (txtcognome.Text) & "*' order by nome") >>>e il nome � con l'apostrofo, non lo trova, quando digito il nome >>>inserisco due volte l'apice, la ricerca funziona benissimo. >>> >>>d'angelo (non lo trovo) >>>d''angelo (lo torva). >>> >>>come posso fare >>> >>>grazie nico. >>> >> >> I don't speak the language you posted in, but I'd hazard a >> guess you need to use % instead of * > >That's Italian. Here's my translation: > >----- > >Subject: search with apostrophe > >Hi, > >When I do a search on a database > Set db3 = db2.OpenRecordset("select * from anagrafe where cognome >like '*" & (txtcognome.Text) & "*' order by nome") >If the name has an apostrophe, it's not found, but when I enter the >name with two apostrophes, the search works fine. > > d'angelo (not found) > d''angelo (found) > >How can I do this? > >Thanks, Nico. > >----- > >I don't do SQL, but I'd guess (*GUESS*!) that perhaps the apostrophe >needs to be escaped in the exact manner that he's doing, and he is >unaware of such a requirement. You are correct. Re-reading it, I should have been able to work that out ;-) -- Jan Hyde https://mvp.support.microsoft.com/profile/Jan.Hyde
From: Auric__ on 13 Jun 2008 14:29 On Fri, 13 Jun 2008 07:53:47 GMT, Jan Hyde (VB MVP) wrote: > "Auric__" <not.my.real(a)email.address>'s wild thoughts were > released on Thu, 12 Jun 2008 18:55:50 +0000 (UTC) bearing > the following fruit: > >>On Thu, 12 Jun 2008 15:19:59 GMT, Jan Hyde (VB MVP) wrote: >> >>> "nico" <galadomenico(a)tin.it>'s wild thoughts were released >>> on Thu, 12 Jun 2008 16:35:39 +0200 bearing the following >>> fruit: >>> >>>>salve, >>>> >>>>quando faccio una ricerca su di un db >>>>Set db3 = db2.OpenRecordset("select * from anagrafe where cognome >>>>like '*" & (txtcognome.Text) & "*' order by nome") >>>>e il nome � con l'apostrofo, non lo trova, quando digito il nome >>>>inserisco due volte l'apice, la ricerca funziona benissimo. >>>> >>>>d'angelo (non lo trovo) >>>>d''angelo (lo torva). >>>> >>>>come posso fare >>>> >>>>grazie nico. >>>> >>> >>> I don't speak the language you posted in, but I'd hazard a >>> guess you need to use % instead of * >> >>That's Italian. Here's my translation: >> >>----- >> >>Subject: search with apostrophe >> >>Hi, >> >>When I do a search on a database >> Set db3 = db2.OpenRecordset("select * from anagrafe where cognome >>like '*" & (txtcognome.Text) & "*' order by nome") >>If the name has an apostrophe, it's not found, but when I enter the >>name with two apostrophes, the search works fine. >> >> d'angelo (not found) >> d''angelo (found) >> >>How can I do this? >> >>Thanks, Nico. >> >>----- >> >>I don't do SQL, but I'd guess (*GUESS*!) that perhaps the apostrophe >>needs to be escaped in the exact manner that he's doing, and he is >>unaware of such a requirement. > > You are correct. Re-reading it, I should have been able to > work that out ;-) Okay, then. Response in Italian for Nico: Il apostrofo deve essere "escaped". Quando � necessario trovare un solo apostrofo, � *necessario* utilizzare due. ----- ....and English, for everyone else: The apostrophe needs to be "escaped". When you need to find a single apostrophe, you *must* use two. -- Rocks fall! Everyone dies!
|
Pages: 1 Prev: Senior Moment re Location of Forms Next: copy table |