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.
Connection is not opening for SQL server 2016 with port 1600 using VB.Net
Connection is not opening when I try to open using VB.Net to MS SQL server 2016 with port 1600. My connection string is "Public globconnectionstring As String = "Server=learningserver.com,1600;Database=learning;User ID=readonly;Password=readonly"0 votes0 answersPrabhakar Reddy2 weeks ago
FYI Released: Microsoft OLE DB Driver for SQL Server
Hi ADO is undeprecated. There is a new release of ADODB driver for SQL Server. It supports SQL Server from 2012 to 2017 and Azure also. Follow the link: https://blogs.msdn.microsoft.com/sqlnativeclient/2018/03/30/released-microsoft-ole-db-driver-for-sql-server/0 votes1 answerJosé Mª Fueyo1 month ago
Server and Localhost database access problem
Hi. I have an asp.net web site on our internal server. And I have a program that is using localhost sql server database. I want to access these localhost database when I open the web page on my computer.0 votes0 answersSüleyman İbrahimbaş2 months ago
Logged in windows user is different than a domain user has SQL access
I have to use fixed Domain user in connection string to connect to SQL server. But the logged user for windows is different. Is there any solution . this is requirement of our project. Please help .0 votes0 answersAsmita Kudale2 months ago
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 Deabae7 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 Baruti7 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 answeruser9 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 Arian9 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 kanyora9 months ago
- Load more posts