Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

ODBC error calling executable from a stored procedure

$
0
0

Hello,

I have an executable created with VB.Net that opens an Access database and executes some queries. It is located on the database server and works perfectly if I run it from a command prompt (on the server).
However... if I call this executable from a SQL Server 2008 stored procedure, it runs correctly until it reaches a point where it has to open a query involving ODBC tables in that specific MSAccess database.
Then, it returns: "ODBC--connection to 'myDSN' failed."
Note: 'myDSN' is an ODBC data source created on the same server and is used by MSAccess tables. It works fine, no problem if I open Access database tables directly. 

T-SQL code in stored procedure:

exec master..xp_cmdshell '"E:\Access_Update.exe"';

Please advise.

Regards,
M.R.
 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>