ODBC/ASP.NET Question

gmorkengmorken Member Posts: 38
Hello,

I'm writing a asp.net application to collect data from Navision table Item Ledger Entry.
My system-DSN is like this:
Identifiers: All except spaces
Langugae: English (USA)

My Select syntax from VS2005 is:
navOdbcCommand.CommandText = "SELECT Item_Ledger_Entry.Cost_Amount_(Actual) FROM Item_Ledger_Entry";

This generates runtimeerror:
ERROR [42000] [Navision a/s][Navision Attain ODBC Driver]Expected lexical element not found: FROM

Is it the () thats the problem?
How can I rewrite this?

Regards

Comments

  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    gmorken wrote:
    Hello,

    I'm writing a asp.net application to collect data from Navision table Item Ledger Entry.
    My system-DSN is like this:
    Identifiers: All except spaces
    Langugae: English (USA)

    My Select syntax from VS2005 is:
    navOdbcCommand.CommandText = "SELECT Item_Ledger_Entry.Cost_Amount_(Actual) FROM Item_Ledger_Entry";

    This generates runtimeerror:
    ERROR [42000] [Navision a/s][Navision Attain ODBC Driver]Expected lexical element not found: FROM

    Is it the () thats the problem?
    How can I rewrite this?

    Regards

    Hi

    The tables belong to company only usualy have ms sql name like[company$table]
  • gmorkengmorken Member Posts: 38
    Im running Navision 3.60 Native
  • IHateTechnologyIHateTechnology Member Posts: 1
    gmorken,
    Try

    SELECT [Cost Amount (Actual)] FROM [Item Ledger Entry]
Sign In or Register to comment.