Error connection to SQL Server 2014 via dotnet
I'm new into using Automations and dotnet, so i'm trying to learn (if I don't explain correct ). I'm trying to connect from NAV 2016 to an external SQL Server 2014 to read and post data to this.
The story is that it works fine when i'm using ADO to connect, but this doesn't allows me to run the batches as scheduled (on a NAS server) - it needs to be run from a client.
The code is:
ConnectionString :='Data Source=mssql.xxxxx.xx;Initial Catalog=XXXX_stage;User Id=xxxx;Password=xxxxxxxx;
SQLConnection := SQLConnection.SqlConnection(ConnectionString);
I have read in the https://connectionsstrings.com and tried some of the different ways to connect.
It is correct that when I used ADO (Automation) I used
ConnectionString :='PROVIDER=SQLOLEDB;Server=mssql.xxxxx.dk;Database=XXXX_Stage;User Id=xxxx;Password=xxxxxxxx';
But when I changed to using dotnet I can't do this as I get the error "...keyword not supported: 'provider'"
I have then tried the following
ConnectionString :='Server=mssql.xxxxx.dk;Database=XXXX_Stage;User Id=xxxx;Password=xxxxxxxx';
ConnectionString :='Data Source=mssql.xxxxx.dk;Initial Catalog=XXXX_Stage;User Id=xxxx;Password=xxxxxxxx';
I'm able to connect to the SQL server in Microsft SQL Server Managment Studio without any problems with the credentials in the Connectionstring
The reason why i'm changing from Automation (ADO) to DotNet is that I can't put the function in a Job queue with the Automation version. It says that
"Microsoft Dynamics NAV Server attempted to issue a client callback to create an Automation object: 00000514-0000-0010-8000-00aa006d2ea4 (CodeUnit xxxx). Client callbacks are not supported on Microsoft Dynamics NAV Server."
I hope that by changing to DotNet would solve that (I was advised to try this)
Please advice what i'm doing wrong if possible
Thank you for answering. My french is a bit rusty though, but by first view I cant find any solutions on the link you have put in.
SSIS package with ODBC source Teradata Deployment issue
SSIS package works fine in Visual Studio, But when deployed it says gives error, SQL Jobs fails execution0 votes0 answersSandesh J2 weeks ago
Connect to SQl with gMSA
I'm trying to make use of gMSA's to connect from ASP/X code to an MS SQL 2016 server. I've configured the gMSA with permissions on the target database and set up the gMSA on the source server, but can't get a connection string configured to use the account.0 votes0 answersSteve Sirag1 month ago
Non-Standard Port with SQL Server ODBC
Why does the SQL Server ODBC Connection page not mention any example of using a non-standard port? I was incorrectly trying to use the "Port" attribute as "Port=x" but that does not work.0 votes0 answersDavid Garcia4 months ago
NUODB to SQL database migration
Hi Guys I am using SQL Server 2012 , using import and export wizard i want to migrate nuodb databse to sql , but could not find any JDBC data source inside the wizard.0 votes0 answersGautam Raj4 months ago
Connection string issue in connecting to SQL Server
I am trying to connect my C# code to SQL Server. My connection string is not working. It gives the following error: "Format of the initialization string does not conform to specification starting at index 0."0 votes0 answersFaizan Rahman6 months ago
[Microsoft][ODBC Driver Manager] Data source file not found and no default driver specified.
I have a VBA code (in excel 2016) that i use to grab information from a MS SQL server (2008R). The connection works fine on the computer i wrote it on. When i run it on another computer i get the error "[Microsoft][ODBC Driver Manager] Data source file not found and no default driver specified".0 votes1 answerlee avery6 months ago
Remote MySQL Linked Server in SQL Server, only show names of the tables.
Remote MySQL Linked Server deployed in SQL Express Management Studio do not show any content and structure, it only LIST NAME of the tables belongs to the remote connected MySQL database0 votes0 answersAdrian Feldman6 months ago
connect from Oracle to MS SQL Server
I want to Connect from Oracle to MS SQL Server with a connection string to pass location (IP) / username / Password and SQL Database !0 votes0 answersFrank Lehmann6 months ago
Excel 2016 VBA OLE SQL connection help
Excel 2016 VBA to create an OLE connection to a sql 2014 db and then execute a stored procedure returning the results starting cell A1 on sheet :StoredProcData. Server & instance is QGZZZ\MYINSTANCE db is data0 votes0 answersRichard8 months ago
how to use regional settings when connecting to SQL Server with a connection string? Is there a parameter for it?
How do i specifiy to use the regional settings (those settings in Windows control panel) for numbers, dates and currency? When defining a DSN connection in ODBC manager Windows i can check to use the regional settings.0 votes0 answersMatthias Rebbe10 months ago
- Load more posts