Using NODBC with variable company

hwijnveen
hwijnveen Member Posts: 2
I'm trying to read from the Navision C/Side database through NODBC. The default DSN that is created when installing NODBC does not contain a reference to a database file and company.
I've tried calling this DSN and specifying database and company in my connection string, but without success:

DSN=Navision Database;
Datbase=<path>;
CN=<company>;

Also, when I specify the database in the DSN itself, a reference to the company using the CN= syntax returns the error message "Company does not exist".

Does anybody know whether or not this can be done? If so, what syntax should be used in the connection string?
Even better would be specifying the entire connection from my own app, like

Driver=Microsoft Navision Driver;
Database= ...;
Company= ...;
etc

Is this possible?

Thanks,
Hans

Comments

  • kine
    kine Member Posts: 12,562
    There are these parameters in the registry for some DSN source t:
    [ODBC]
    DRIVER=Microsoft Dynamics NAV Driver
    ProgramFolder=C:\\Program Files\\Common Files\\Navision\\NODBC\\
    DatabaseName=
    CompanyName=My Company Name
    Server=yes
    ServerName=MyServerName
    NetType=tcp
    UserID=Username
    PWD=codedpassword
    WindowsLogin=no
    Language=Auto (Windows Language)
    OptionFieldType=Text
    CommitCache=yes
    DBMSCache=8000
    ClosingDate=no
    ReadOnly=no
    EnableBlob=no
    RegionalDecSymbol=no
    Identifiers=0
    QryPlan=0
    DrmSpy=0
    FiltSpy=0
    NoJoinOpt=0
    NoFiltOpt=0
    NoIndexes=0
    MaxColSupport=
    CODEPAGE=
    ViewFileDirectory=
    ProgramFolder=C:\\Program Files\\Common Files\\Navision\\NODBC\\
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.