Visual Studio VB 2010 SQL/MySQL/Access queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mreed1972
    New Member
    • Aug 2012
    • 2

    #1

    Visual Studio VB 2010 SQL/MySQL/Access queries

    I have found that when I connect my VB application to an Access database and perform the query: LIKE ? + %

    That special LIKE query doesn't work the same way with MySQL or SQL. I've played around in MySQL and found that: LIKE '%' & ? & '%' does just about the same thing, and actually works a little better than the access query above.

    my question is, does anyone know of a good (easy) reference guide that will show queries and what their format would be in different databases? I am constantly working in one of the 3 different DB's listed above and I'm always having difficulty working with the queries for each.
  • ariful alam
    New Member
    • Jan 2011
    • 185

    #2
    MSSQL server or MySQL server uses % as wild card search.
    like -> Like '%' + 'your search text' + '%'

    MS Access uses * as wild card search. moreover
    like -> Like '*' & 'your search text' & '*'

    NOTE:
    You should use each Database systems help section for better knowledge on LIKE operator. Just open those help system and type 'LIKE' in search box. Those will show you the help on LIKE with examples.

    Comment

    Working...