Microsoft
Software
Hardware
Network
Question : What's Wrong With This SQL Query?
I'm trying to find all company names that contain an apostrophe, When I enter the following SQL in an Access queary:
Select * from [employers] where [company] like '*''*'
it works fine, retuning 200 rows. But I can't seem to find the correct syntax for use with OLEDB programmatically:
Dim qString As String = "Select * from [employers] where [company] like '*''*'"
cmd2 = New OleDbCommand(qString, DB)
rdr2 = cmd2.ExecuteReader
If rdr2.HasRows Then
MsgBox("has rows")
End If
No rows are returned. What's wrong with my syntax?
Answer : What's Wrong With This SQL Query?
Keep in mind that there are two apostrophes in the middle
1:
SELECT * FROM [employers] WHERE [Company] Like '%''%'
Random Solutions
parsing XMLDOM
How do I write data to separate excel worksheets in coldfusion?
Crystal report 2008, draw graph with huge of data.
Iterating through a PDF file (stepping through) for validation purposes
Cisco VPN client for Windows, use both RSA SecurID soft token and hard token
Assigning a GPO to specific users and one Server only ?
Default parameter to max date
How to improve the email performance in C#
How do I setup my domain controller to keep the correct time on my domain?
MS Access SQL Divide by Zero workaround needed