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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO not functionioning in Access 97

Status
Not open for further replies.

JungleMonkey

Programmer
Aug 18, 2002
19
0
0
US
I am using Access 97 on the backend, VB6.0 and ADO. I have a table with this entry:
W. S. M. Z.--103.1 FM

Using a simple query to find this string, "Select * From TableA where thisField = 'W. S. M. Z.--103.1 FM', I recieve no records in my recordset.

When I delete the two hyphens and the 103.1 FM, it the sql string finds the record.
My question is that when I have two hypens in a field, do I use a delimiter
 
As a general rule, two hyphens shouldn't cause any problems with the string. Try something like this

Dim strHolder as String, strSQL as String
strHolder = "W. S. M. Z.--103.1 FM"
strSQL = "Select * From TableA where thisField = '" & strHolder & "'"

Then run the Select statement and see if it helps.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top