Re: SQL SELECt with ' in filter name
- From: "Victor Koch" <v i c t o r (arroba)correo(punto)waldbott(punto)com(punto)ar>
- Date: Thu, 15 Jun 2006 11:46:29 -0300
Hi Khalid,
Try this
Sql= "SELECT * FROM 'cars.sold' where seller='" &
Replace(txtSellername.text,"'","''") & "'"
--
Víctor Koch.
"Khalid Rahaman" <KhalidRahaman@xxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
mensaje news:972A1E89-6FCB-47AA-921B-3BB6977EB8B0@xxxxxxxxxxxxxxxx
I am trying to filter a recordset using the following SQL statement
SELECT * FROM 'cars.sold' where seller='" & txtSellername.text & "'"
the txtsellername.text refers to a texbox on the VB form which enters the
name i want to filter by.
This works great for everything except when the variable contains an ' in
the textbox for example "Joe's Auto".
Any help would be appreciated.
Thanks
.
- Prev by Date: Re: ROW-00001: Cannot allocate memory
- Next by Date: Re: SQL SELECt with ' in filter name
- Previous by thread: Re: ROW-00001: Cannot allocate memory
- Next by thread: Re: SQL SELECt with ' in filter name
- Index(es):
Relevant Pages
|
|