Article View: free.it.visual-basic
Article #1056ricerca record in una tabella
From: IceTrap
Date: Sat, 13 Nov 2004 11:02
Date: Sat, 13 Nov 2004 11:02
21 lines
1669 bytes
1669 bytes
Ho questo problema :
Devo cercare un cliente presente in una tabella db access per cognome e
utilizzo il seguente codice :
Dim cnnUnita As New ADODB.Connection
Dim strSQLUnita As String
Dim strConUnita As String
Dim rstUnita As New ADODB.Recordset
strConUnita = "DSN=Geppo"
cnnUnita.Open strConUnita
strSQLUnita = "SELECT * FROM Clienti WHERE Cognome= TRIM('" & "Di
Girolamo" & "') " '
rstUnita.Open strSQLUnita, cnnUnita, adOpenKeyset, adLockOptimistic,
adCmdText
etc.....
ok ?
Bene il problema o meglio l'errore nasce quando il cognome di un cliente οΏ½
del tipo : D' Ambrosio... cioοΏ½ quando devo cercare un cognome con un
apostrofo va in errore..... ? Qualche dritta ? Dove sbaglio ?
Grazie a quanti risponderanno.
Technical Details
Message-ID:
<cn4pgu$e7f$1@newsread.albacom.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!News-Peer-Europe!news.stupi.se!newsfeed.albacom.net!newsread.albacom.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f94ee,dd6c76eb70650cb1,start X-Google-Attributes: gidf94ee,public X-Google-Language: ITALIAN,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!News-Peer-Europe!news.stupi.se!newsfeed.albacom.net!newsread.albacom.net!not-for-mail From: "IceTrap" <icetrap73@yahoo.it> Newsgroups: free.it.visual-basic Subject: ricerca record in una tabella Date: Sat, 13 Nov 2004 12:02:36 +0100 Organization: Albacom S.p.A. Lines: 24 Message-ID: <cn4pgu$e7f$1@newsread.albacom.net> NNTP-Posting-Host: 213.255.118.143 X-Trace: newsread.albacom.net 1100343646 14575 213.255.118.143 (13 Nov 2004 11:00:46 GMT) X-Complaints-To: abuse@albacom.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441