|
-
May 22nd, 2013, 06:17 AM
#1
Thread Starter
New Member
[RESOLVED] Apostrophe in String Data causes error.
Hi
I am a noob to VB6 but am supporting some code written by another person a long time ago. Upto now I have been doing OK but I recently hit an issue that is outside of my experience and I was hoping someone could point me in the right direction. The program in question is auto-processing emails (the client is Outlook) and performing actions based upon the content of the email.
The issue I have hit however is that for the first time we received an email from an sender who's email address contained an apostrophe character > ' < e.g. rosie.o'[email protected] which crashed the email lookup function. The failing code is as follows:
Private Function FindRecord(EmlDBObj As Object, SQLSearchString As String)
If EmlDBObj.RecordCount > 0 Then
EmlDBObj.MoveFirst
EmlDBObj.Find SQLSearchString, , adSearchForward
End If
I would greatly appreciate any suggestions of how to handle the apostrophe issue.
Thanks in advance .... Colin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|