Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple single quotes problem----Very Urgent !!

Status
Not open for further replies.

vikaskalra

Technical User
Aug 12, 2002
41
GB
Greetings !


Folks I need your expert help on the following case :

I have a recordset, on which I have to filter on multiple fields, in the following manner :

rs.filter ="Description = 'BPD LUCKNOW(260)' and TERRITORYNAME='MUNGR,BNORE,I(602)'"

I don't get any problem when there is a Single Quote in the Field Value, as I have a replace done on the value, which replaces all the single quotes with a two single quotes so the following works fine:

rs.filter="Description = 'BPD LUCKNOW(260)' and TERRITORYNAME='MUNGR,B''NORE,I(602)'"

but the following does not work and raises an error :-

rs.filter="Description = 'BPD LUCKNOW(260)' and TERRITORYNAME='M''UNGR,B''NORE,I(602)'"

Please let me know if there is any way you folks can suggest any solution to this problem.

Regards,
Vikas
 
[tt]

Try

From:
rs.filter="Description = 'BPD LUCKNOW(260)' and TERRITORYNAME='M"UNGR,B"NORE,I(602)'"

To:
rs.filter="Description = 'BPD LUCKNOW(260)' and TERRITORYNAME='M''UNGR,B''NORE,I(602)'"






<%=Tony%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top