Sage Line 50 ADODB connection with Classic ASP on IIS6 - Authentication Failed

432 Views Asked by At

We have a classic asp page running on IIS6, which connects to our Sage Line 50 (v17) with the following code:

'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
Err.Clear
On Error Resume Next

adoCon.ConnectionTimeout = 0
ConStr="dsn=SageLine50v17;UID=uid;Password=pwd;"
adoCon.Open ConStr

If Err.Number <> 0 Then

    Response.Write (Err.Description& "<br><br>")
    Response.Write (Err.Number)
    Response.End

End If

This works perfectly most of the time. However, occasionally, it throws the following error:

Authentication failed -2147217843

My question is, what is causing the error? I'm thinking it is Sage throwing it back, but on searching for the error number (-2147217843!), I find nothing online.

1

There are 1 best solutions below

0
On

I would test the DSN in excel or access then I would check the iis usr has permissions on the sage accdata folder :)