I am creating an ODBC connection to Import data from SQL (SSMS) to D365FO.
I have created a Test database and created an ODBC Data Source for it (DSN: TestDS, Server: local, Default database: TestDB).
Running SQL Server ODBC Data Source Test works fine:
Running connectivity tests...
Attempting connection
Connection established
Verifying option settings
Disconnecting from serverTESTS COMPLETED SUCCESSFULLY!
The Server Browser is running, class runOn server is set.
Here is a piece of my code:
public server static void main(Args _args)
{
OdbcConnection con;
LoginProperty loginProp;
loginProp = new LoginProperty();
loginProp.setDSN("TestDS");
con = new OdbcConnection(loginProp);
}
In the debugging window it throws me the following error:
"Object 'OdbcConnection' could not be created"
On the user side I am getting the following errors:
"ODBC operation failed. Unable to log on to the database."
"Unable to retrieve message for retval -1, ODBC call reason code -2, SQLSTATE = []"
As I know, ODBC for data import hasn't been yet supported in 2016. Is it supported now? I have found the exactly similar standard AX7 code, but I am not able to test if it works in standard.
Anybody had something similar to this and got it solved?