Writing to External SQL Server via DotNet - issues in Job Queue

madsmorremadsmorre Posts: 37Member
edited 2018-01-12 in NAV Three Tier
Hi
I have written a small codeunit for test that delivers some data to an external SQL-server. I use the DotNet methods to write to the SQL-Server.

Test - running the function manually in Client
1. Set the Parameter "RunOnClient" = FALSE on DotNet Globals
Expect: An error as RunOnClient = FALSE
Result: Get the error ".....The Network path not found"

2. Set the Parameter "RunOnClient" = TRUE on DotNet Globals
Expect: No Error - the function works
Result: The function works and i'm writing to external SQL-server (YES!)

Test - running the function in a job Queue (the Job Queue runs via NAS service)
1. Set the Parameter "RunOnClient" = FALSE on DotNet Globals
Expect: No Error - the function works
Result: Get the error ".....The Network path not found"

2. Set the Parameter "RunOnClient" = TRUE on DotNet Globals
Expect: An error as RunOnClient = TRUE
Result: Get the error ".....Client Callback is not allowed...."

Can anyone tell me what i'm doing wrong (Job Queue - No. 1) :smile:

Best Regards
Mads Morre

Best Answer

Answers

  • ErictPErictP Posts: 157Member
    Is the network-path defined as \\server\sharename\ ?
    Has the service-account from the middle tier enough rights to read/write to this network-path?
  • madsmorremadsmorre Posts: 37Member
    Hi ErictP

    This is the connectionstring
    ConnectionString :='Data Source=mssql.xxxxxx.dk;Initial Catalog=Mxxxxxx;User Id=xxxx;Password=xxxxxxx*';

    It is an external SQL-server - outside my domain

    Again - it works when I press the button as a client (it uses the login in the connectionstring). Isn't it supposed to do the same in a job queue?
  • madsmorremadsmorre Posts: 37Member
    Ahh, this could be the issue.... (i think it must be)
Sign In or Register to comment.