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
Code was working in Android 2.1 SDK but not on 2.2
Access 2003 -> Word 2003 - have a question on code that works to save doc as pdf file...
compareTo() - JavaScript example needed
Running RMI on Tomcat Servlet - How do I set up RMISecurityManager?
Need HP DMI Utility
How to make IN operator to accept CSV which are varchar in SQL Server 2008
Resize multi select boxes in SharePoint form
Hidden answers after logging in
Link to PDF files from DVD Menu
Port Forwarding over Draytek VPN - help needed