Options

NAV 2013 R2 connect to external SQL Server

zulqzulq Member Posts: 204
edited 2014-03-19 in NAV Three Tier
We use to have codeunit using Automation to get some data from another SQL server but now getting errors. We would like to re-write it if possible using other means connecting to SQL Server directly. However I've done some search for such info but no luck. Any link/info as how to connect to another sql server and grab data?
](*,) ](*,) ](*,)
Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?

Answers

  • Options
    kinekine Member Posts: 12,562
    Try to use same thing you can in C# - like: http://www.codeproject.com/Articles/441 ... -through-C
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    zulqzulq Member Posts: 204
    @kine we still want to use codeunit as it has to be triggered before a report is ran, please elaborate.
    Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
  • Options
    kinekine Member Posts: 12,562
    Yes, just instead automation you can use DotNet interop to do what you need... :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    zulqzulq Member Posts: 204
    Thanks @kine, finally using the DotNet System.Data package.
    Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
  • Options
    hrishihrishi Member Posts: 21
    hello guys, any idea how System.Data can be reference in Visual Studio Code please BC on-premise?
Sign In or Register to comment.