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); SQLConnection.Open;
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=XXXXStage;User Id=xxxx;Password=xxxxxxxx'; and also ConnectionString :='Data Source=mssql.xxxxx.dk;Initial Catalog=XXXXStage;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
maybe this will be helpfull for you: https://convertir.github.io/
Hi Lisa 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.
sql server tcp connection timed out
i have installed SQL server 2016 on a VPS that is running Win server 2016, i have enabled TCP/IC conectivity and made inbound rules for ports 1433,1434 and SQLSERV.exe.0 votes2 answersReza Deabae4 months ago
Connection String for a Hosted Database (Domain/Web hosting Provider) --- Windows Forms
I have domain name, and host account with a service provider. I want to host a sql server database through the service provider. I'm developing a windows forms application that I want to access this database. Whats the way to go with this situation?0 votes2 answersOageng Escobar Baruti4 months ago
Error with ODBC Connection
I am getting error as below: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I have installed the ODBC driver to connect to SQL server.0 votes1 answeruser6 months ago
How to create automatic connection string and attach database
Hi I made a program in visual c# 2013 and aql 2012.i want to create connection string that automatically use and setup in a system with sql express.and so automatically attach database.how can i do????please help me0 votes2 answersEhsan Arian6 months ago
System.ArgumentException: Keyword not supported: 'provider'
Hi , kindly assist.. am trying to import data from excel to sql database. am using excel 2016. am getting the following error " "System.ArgumentException: Keyword not supported: 'provider"0 votes1 answerjohn kanyora6 months ago
trouble to run my app when installing on another system
I have trouble to run my app when installing on another system the language is c# and I used DataAdapter and drag table to form to connect to db. when I Install on another system it gives sql server error :0 votes1 answerunknown6 months ago
Online Web Service to Database Connection String
I'm fairly new to databases and Web Services. A small project I want to do involves making a Web Service that connects to a database.0 votes3 answersKouichi Yamada7 months ago
connection string IP instead of instance name
We have Two Site ( "A" & "B" ) and both site are different subnet (Site "A" 125 sunbet ) (Site "B" 240)and we has been installed Two type of SQL Cluster 2014 one site "A" and another one Site "B"0 votes0 answersSubash T9 months ago
Noninteractive domain user in a connection string.
Hi, Two questions I wish to ask.... Domain user id and password not working in connection string. Server=IDB01\MS;Database=Tax;User id=in\sqluser; Password=123**;Connect Timeout=0;0 votes0 answersJignesh Desau11 months ago
- Load more posts