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
SpellNumber
Setting Dell 2330dn Printer to Automatically Print from Multi-Purpose Tray
Windows 7 recently used programs is blank
Server 2008 quickest way to delete a large folder with millions of files
Registry, Winlogon, KEY_WOW64_64KEY errors
Terminal server 2008 R2 Pinned Taskbar Links
Microsoft Exchange Outlook Anywhere SSL Issue
OpenOffice 3.2 GPO Install Problem
Dynamically building an image menu?
how to use data base in jsp?