connection to nav via odbc php

bimo88bimo88 Member Posts: 22
hi,

i'm a novice in nav and i'm trying to access a nav database via à php script using odbc . when i execute i'm getting this message error:

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Simba][SimbaEngine ODBC Driver]Non unique column reference: Total Cost (Hours)

i've searched and i founded that i have two fields the same captions but when i look at the table there are no fields with the same caption.

sorry for my english it's not perfect :d

please help

Comments

  • kinekine Member Posts: 12,562
    1) Be sure that you are looking at Caption of the fields, not names which are displayed by default.
    2) Try to set the ODBC to use Universal language, may be it will use names and not captions...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • bimo88bimo88 Member Posts: 22
    thanks for your answer,

    i'm on a frensh version when i turned it into english i've founded the fields with the same caption.now it's working perfectly.
    thanks again.
  • bimo88bimo88 Member Posts: 22
    hi again,

    i'm trying to import the content of the table resource group via un php/SQL script but i have always an error .i've tried many syntax but its not working:

    $query = "SELECT * FROM [Resource Group]";
    $query = "SELECT * FROM Resource Group";
    $query = "SELECT * FROM 'Resource Group'";

    $result = odbc_exec($link2,$query);

    do you have any idea please?
    thanks a lot
Sign In or Register to comment.