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
Finding file owner - getting an error: identity references could not be translated
VC++ hiding console
Unable to copy and paste files through remote desktop
Cannot boot into Windows 7 partition (Blinking cursor) after using Acronis Disk Director resize
VMware, vSphere Virtual Machine and Disk Errors "invalid disk type 7" and "cannot detect guest operating system type"
Red "X" appears in the icon for a mapped network drive in Windows 7, even though you can successfully access the drive
namespace question
How can I prevent my object being overwritten in a for loop?
Where can I find free borders to download?
If IE6 use another .css file.