ODBC and ASP, Connection strings

hamishhamish Member Posts: 4
edited 2002-12-12 in Navision Attain
I am attempting to extract data out of Attain using C/OBDC without much luck. I have a User DSN setup called 'Navision' this appears to work as I have successfully made connections in MS Access however I am returned an error from IIS. running IIS 5 and W2K.

Connection String:
Set connNavision = Server.CreateObject("ADODB.Connection")
connNavision.Open "DRIVER={C/ODBC 32 bit};DSN=Navision;UID=web;PWD=web"

Error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Navision Software a/s][Navision Attain ODBC Driver]Invalid login

The UID and PWD are all correct and under the DSN setup the C/ODBC seems correct as it lists the companies. (just running a virgin cronus)

any help would be appreciated.

Hamish Anderson

Comments

  • hamishhamish Member Posts: 4
    Well here I am replying to myself <img border="0" title="" alt="[Smile]" src="images/smiles/icon_smile.gif" />

    I made the realisation that a user DSN was not appropriate as you log into IIS as anon so I have since made it a system dsn which produces the following error:

    [Navision Software a/s][Navision Attain ODBC Driver]ISAM error
    /attainodbc/getall.asp, line 20

    the ASP is the same, should I be using a file DSN. If anybody could explain the above it would be fantastic.

    ta, Hamish.
  • ZenZaggZenZagg Member Posts: 9
    I have been experiencing the same ISAM error in Navision Financials US 2.00. I use a system DSN to connect to Navision through Visual Basic. MDAC 2.5 and above cause this error, but anything lower does not. Microsoft has a knowledge base article explaining possibly why this happens (Q192652). I hope a solution is found soon.
    Travis Rosenbaum
    Internal Software Developer
    Consolidated Engineering Co.
    Kennesaw, GA, USA
  • ZenZaggZenZagg Member Posts: 9
    Oh great, now I'm getting the same set of errors (Invalid login/ISAM Error) when using ADO to make a DSN-less ODBC connection to NF. Does anyone know what would be causing this? The same connection string works in DAO...

    ODBC;CSF=Yes;;DRIVER={C/ODBC 32 bit};SName=Applications;NType=tcp;CN=Consolidated Engineering;UID=User;PWD=Pass;OPT=Text;QTYesNo=Yes;QT=60;IT=a-z,A-Z,0-9,_;RO=No;CC=Yes;BE=Yes;

    Can someone please help us on this issue?
    Travis Rosenbaum
    Internal Software Developer
    Consolidated Engineering Co.
    Kennesaw, GA, USA
  • ZenZaggZenZagg Member Posts: 9
    Ah ha! I don't know why, but the same exact code works when placed in a VB class module. I made all my other connections reference the class module's connection object (which connects on Class_Initialize) to access the database (which has the added benefit of needing only one connection). I don't know how you would implement a similar solution in ASP, but I hope this information helps. Perhaps having the connection reside in a class object somehow enforces the integrity of the communications between the provider and CODBC?

    Onward with the Global Virtual DSN(tm) project!
    Travis Rosenbaum
    Internal Software Developer
    Consolidated Engineering Co.
    Kennesaw, GA, USA
  • DjangManDjangMan Member Posts: 15
    I've contacted support about this. I had a Delphi application connecting to a 3.01B database via ADO without any problems. When the database and client was updated to 3.10B the ODBC connection would add 1 record to Attain in about 1 second. The next update took about 20 seconds, the third a few minutes and the fourth may or may not be successful - I'd crash.

    Support said that ADO isn't supported and that DAO is how you have to connect. :?

    Django
Sign In or Register to comment.