Adapting wildcard characters to DBMS/Connections in .Net

A developper in my company has developped a C# project containing classes to execute SQL queries on the following DBMS :

  • Access (A DB file with the extension ".mdb") by using one of the following connections :
    • An ODBC connection.
    • An OLE DB connection
  • Access (A DB file with the extension ".accdb" extension) by using one of the following connections :
    • An ODBC connection.
    • An OLE DB connection.
  • DB2 by using an ODBC connection.
  • MySQL by using one of the following connections :
    • An ADO .Net connection.
    • An ODBC connection.
    • An OLE DB connection.
  • Oracle by using one of the following connections :
    • An ADO .Net connection.
    • An ODBC connection.
    • An OLE DB connection.
  • PostgreSQL by using one of the following connections :
    • An ADO .Net connection.
    • An ODBC connection.
  • SQL Server by using one of the following connections :
    • An ADO .Net connection.
    • An ODBC connection.
    • An OLE DB connection.

I want to implement a method that will be used to adapt wildcard characters in a string used in a predicate of a SQL query. Then the SQL query will be executed. When a developper needs to use wildcard characters then he will use a known character independant from DBMS.

Wildcard characters can differ from DBMS. Examples :

  • The wildcard character used by Access is '*'.
  • The wildcard character used by SQL Server is '%'.

But I wonder if the wildcard character also depends on the connection used to communicate with the DBMS. The wildcard character used by an ODBC connection could be different from the wildcard character used by an ADO .Net connection. I have not been able to perform a test on each pair of DBMS/Connection listed above because I cannot use some DBMS.

Answers


I have executed programmatically select queries for each pair of (DBMS/Data provider) listed in my first post except for the pair (DB2/ODBC). I have included a predicate in the where statement of my select query. I have used the multi-character wildcard character : % The wildcard character '%' works for each pair of (DBMS/Data provider) on which I have performed the test.


Need Your Help

Jquery Getting correct element id with calling same name?

javascript jquery html

I have some different items on the same page and each of it has a comment part.My aim is to get input id when someone write something in textbox, but when i call textbox's id it return always same ...

Core Plot Legent do not show

objective-c core-plot

I am totally new to Core Plot and I am not able to add a Legend to my view. I have been trying all kinds of tutorial's and read a lot of information but am i do not understand how to display the le...