After checking nearly every possible reason I finally discovered that the deployed applications have to be started from a local drive!! ...This is true for the adodb version and also for jDBC approaches...Obviously otherwise integrated security authentification won't be successfull...
connectivity problems with deployed version of ADODB (SQLOLEDB Provider) connection to a Microsoft SQL Server
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
To access a Microsoft SQL Server we have successfully used ADODB and more specifically the SQLOLEDB provider in the "normal" Matlab context.
However the very same code does not work in deployed applications and since the used sqloledb.dll is provided by Windows the possible reasons are totally unclear. For example I have tried the following basic code to establish a connection:
connection_string='Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=OUR_CATALOG;Data Source=OUR_SERVER;';
conn = actxserver('ADODB.Connection');
conn.Open(connection_string);
While this code works fine in Matlab the deployed .exe (with mcc -N -m -v ADOdb_conn_test.m) brings up the error:
Error using COM.ADODB_Connection/Open
Invoke Error, Dispatch Exception:
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server existiert nicht oder Zugriff verweigert.
Error in ADOdb_conn_test (line 8)
MATLAB:COM:E2147500037
As you can see from the connection string integrated security is used and the problem might be linked to this fact...What could be the reason that such a connection works flawlessly in Matlab but not in a deployed exe?
By the way similar troubles arise with alternative JDBC connections, even when the hints from the integrated security answer are respected...
1 comentario
Respuestas (1)
Umakant
el 20 de Mayo de 2015
Hi Florian,
Looking at the error message it seems that there is an issue when you establish a connection to the server. The most portable way to deploy a standalone application that requires SQL connection is given at the link below:
You may also find the following article useful to configure the Java run time library in MATLAB with and without admin privileges:
Thanks,
Umakant
0 comentarios
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!