G
Gina
I am using Access 2003 to create a messaging program based on XML documents
received from GPS units. I am forced to use the unit number and message text
to match up incoming XML documents with my database records. I use the
following SQL statement:
"SELECT * FROM tblMessageOutbox WHERE VehicleID = " & _
objXMLDoc.selectNodes(strRootNode & "/VEHICLE_LABEL").Item(intCounter).
nodeTypedValue() & _
" AND MessageText LIKE '" & Left(objXMLDoc.selectNodes(strRootNode &
"/ORIG_OUTBOUND_MESSAGE").Item(intCounter).nodeTypedValue(), 10) & _
"*' AND (SendStatus = 'Sending' or SendStatus = 'Queued')")
The problem I ran into today is that one of the messages contained the #
character. This character was treated as a wildcard and not a literal. This
prevented the matching record from being found. I assume that this will be a
problem with any of the wildcard characters. What do I need to add to my code
so that wildcard characters in the search string will not be treated as
wildcards?
Thank you,
Gina
received from GPS units. I am forced to use the unit number and message text
to match up incoming XML documents with my database records. I use the
following SQL statement:
"SELECT * FROM tblMessageOutbox WHERE VehicleID = " & _
objXMLDoc.selectNodes(strRootNode & "/VEHICLE_LABEL").Item(intCounter).
nodeTypedValue() & _
" AND MessageText LIKE '" & Left(objXMLDoc.selectNodes(strRootNode &
"/ORIG_OUTBOUND_MESSAGE").Item(intCounter).nodeTypedValue(), 10) & _
"*' AND (SendStatus = 'Sending' or SendStatus = 'Queued')")
The problem I ran into today is that one of the messages contained the #
character. This character was treated as a wildcard and not a literal. This
prevented the matching record from being found. I assume that this will be a
problem with any of the wildcard characters. What do I need to add to my code
so that wildcard characters in the search string will not be treated as
wildcards?
Thank you,
Gina