DataHelper.ExecuteDataset for different database providers

I have a small utility .Net that was used to transform data from one database to another. Initially it was written using SQLHelper DAAB class. Then it was extended to work with OledbHelper , that was created based on SqlHelper. Now it was requested to work with ODBC provider as well.
I know, that I can use Enterprise library DAAB(e.g see here) , but I decided not  involve additional DLLs and extra settings in config file for this simple application.

The static finction to return dataset for specified SQL and nominated provider is below:

        public const string OleDBProviderInvariantName="System.Data.OleDb";

        public const string OdbcProviderInvariantName="System.Data.Odbc";

        public const string SQLProviderInvariantName = "System.Data.SqlClient";

  

     //COnsider to use DAAB in Enterprize Library instead

        //Provider name is case sensitive, such as "System.Data.OleDb","System.Data.Odbc","System.Data.SqlClient";

        public static DataSet ExecuteDataset(string ProviderInvariantName, string sConnString, string sSQL)

        {

            DebugHelper.TracedLine("sConnString=" + sConnString);

            DbProviderFactory fact = DbProviderFactories.GetFactory(ProviderInvariantName);

            DbConnection conn = fact.CreateConnection();

            conn.ConnectionString = sConnString;

             DebugHelper.TracedLine("(sSQL=" + sSQL);

            DbCommand cmdSelect = conn.CreateCommand();

            cmdSelect.CommandText = sSQL;

            DbDataAdapter da = fact.CreateDataAdapter();

            da.SelectCommand = cmdSelect;

            DataSet ds = new DataSet();

            try

            {

                da.Fill(ds);//Table

            }

            catch (Exception exc) //MNF 18/5/2005

            {

                throw new FSCSharpLib.ExceptionWithDetails(exc.Message, " sSQL = " + sSQL, exc);

            }

            return ds;

        }



 

CQL to RPN mapping file pqf.properties changes to support different servers

I have a z39.50 client, that uses CQL language and YAZ to communicate to Z39.50 server. Yaz distribution includes  etc/pqf.properties CQL to RPN mapping file, that I've used satisfactory without changes.
However one of the servers, that I wanted  to search, returned 0 to any query in CQL.
Some debugging showed that the server  doesn't support BIB-1 COMPLETENESS ATTRIBUTES  (TYPE = 6) and any query, that included @attr 6, retuned 0. Additionally they didn't understand support attribute 1=1016 (any).
I had to modify a few lines in
pqf.properties to work with the server.

# MNF 16/3/2007 replaced serverChoice,
index.cql.serverChoice                          = 2=3

# index.cql.serverChoice                                   = 1=1016

# MNF 16/3/2007 excluded 6=1
# position.any    = 3=3 6=1
position.any    = 3=3

# MNF 16/3/2007 excluded always
# always     = 6=1
# 6=1: completeness = incomplete subfield

The Z39.50 server  is based on the TeraText Database System, that, as I've been informed, doesn't support bib-1 completeness.


«March»
SunMonTueWedThuFriSat
25262728123
45678910
11121314151617
18192021222324
25262728293031
1234567