Hi,
I have created a codeunit whereby I am connecting to a SQL Server 2012 database. In the codeunit, I have created a function OpenConnection which contains the piece of code below:
IF ISCLEAR(ADOConnection) THEN
IF NOT CREATE(ADOConnection, FALSE, TRUE) THEN
ERROR('Cannot create ADO Connection automation variable');
ADOConnection.ConnectionString('Provider=SQLOLEDB;Data Source=SERVERNAME;Initial Catalog=REPLICATION_DEV;User ID=sa;Password=XXXXXXX;');
ADOConnection.Open;
When I run the codeunit manually, it connects to the SQL Server 2012 database correctly.
Now I want to setup job queue for the codeunit to run automatically. But after starting the job queue, it is saying that the ADOConnection cannot be created.
Have anyone of you ever encountered an issue like this and if so what are the steps to solve it.
Thanks.
Regards
Dnivra
0