I made a project to test using a connection with Gupta.Sql.Base.dll (version 9.0.1.13768), we use version SQLBase901 (that's the SqlBase folder). I added that Gupta.Sql.Base.dll as a project reference, but the execution ends without exception in the line:

SQLBaseDataReader  reader = command.ExecuteReader(); //Error here that closes the App with no Exception

The app simply closes with no exception being thrown. Here is the code:

    private void button1_Click_1(object sender, EventArgs e)
    {
        string connectionString =  "data source=storage; uid=sysadm;ini=c:\\sqlbase901\\sql.ini";
        string queryString = "SELECT * FROM LAPOS_TRANSACCION";
        int paramValue = 145;

        using (SQLBaseConnection connection = new SQLBaseConnection(connectionString))
        {
            SQLBaseCommand command = new SQLBaseCommand(queryString, connection);
            command.Parameters.Add("@cod_farmacia", paramValue);
            try
            {
                connection.Open();
                SQLBaseDataReader reader = command.ExecuteReader(); //Error here that closes the App with no Exception
                while (reader.Read())
                {
                    Console.WriteLine("\t{0}\t{1}\t{2}",
                        reader[0], reader[1], reader[2]);
                }
                reader.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();
        }

    }

The report shows the error raises in file ntdll.dll

-------Error
Nombre de la aplicación con errores: PruebaConexionSqlBase.vshost.exe, versión: 14.0.23107.0, marca de tiempo: 0x559b788a
Nombre del módulo con errores: ntdll.dll, versión: 10.0.18362.1049, marca de tiempo: 0x37fd3042
Código de excepción: 0xc0000374
Desplazamiento de errores: 0x000dfa1d
Identificador del proceso con errores: 0x3bb8
Hora de inicio de la aplicación con errores: 0x01d68c2c8f4b0e27
Ruta de acceso de la aplicación con errores: C:\Prueba\PruebaConexionSqlBase\PruebaConexionSqlBase\bin\Debug\PruebaConexionSqlBase.vshost.exe
Ruta de acceso del módulo con errores: C:\Windows\SYSTEM32\ntdll.dll
Identificador del informe: 478cec12-bee4-4dfe-9465-f9cc2deea3d6
Nombre completo del paquete con errores: 
Identificador de aplicación relativa del paquete con errores: 

EDIT: Another example with different code, same result, in this case the App closes when executing line: Adapter.Fill(ds, "EMPLOYEE");

//' Setup the SQLBase connection string
SQLBaseConnection conn = new SQLBaseConnection();
conn.ConnectionString = "data source=storage; uid=sysadm;ini=c:\\sqlbase901\\sql.ini";

//' Open a connection to SQLBase
conn.Open();

SQLBaseDataAdapter Adapter = new SQLBaseDataAdapter();

SQLBaseCommand cmd = new SQLBaseCommand();
cmd.CommandText = "SELECT * FROM OPERACION_MENSAJE";
cmd.Connection = conn;

Adapter.SelectCommand = cmd;

// Create a new DataSet
DataSet ds = new DataSet();

Adapter.Fill(ds, "OPERACION");

// Close the database connection
conn.Close();

The reason I want to test this connection method is that I had problems in specific cases with OLEDB (the current connection method I use) and also with ODBC:

ODBC: After some hours, the connector uses memory available on the PC, it's not releasing it.

OleDB: In some situations we have concurrency problems, the App having these problems is written in Delphi, it's a bit hard to reproduce the problem when it happens but in certain cases after a query a table keeps locked and then other client computers can't get an answer when sending their queries.

In your opinion, what's the best (most reliable and best performance) way to connect to a SqlBase database?

Thank you very much!!

1

There are 1 best solutions below

2
On

You are asking:

what's the best (most reliable and best performance) way to connect to a SqlBase database.

but you are referring to SQLBase v9 - which is A-n-c-i-e-n-t...... SQLBase is now v12.3 64bit, and light years ahead of v9. So its difficult to answer your question. If you were running v12.nn, as you should be, ( or at the very least v11.7 ) then without doubt OLEDB is the fastest, easiest and most reliable connection method. Concurrency is not an issue. Forget ODBC - its just a bottleneck. We have 300 users on SQLBase v12 OLEDB - no issues. But v9 OLEDB is so old - and reference to 'ntdll.dll' , combined with Delphi, put this in the category of 'good luck with that one'.

My best advise is to upgrade your database to a modern, properly supported version , before wasting too much time on v9 OLEDB. Sorry I cant help more - maybe someone else has experience of v9 OLEDB.