No announcement yet.

[SOLVED] Bug: table field named Size,Upper,Last and similar

  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Bug: table field named Size,Upper,Last and similar

    Scriptcase 8.1 on Debian Jessie. DB is MsSQL 2008R2
    The DB is on production, so I cannot rename column names.

    I have several tables with fields named as "reserved" words: Size, Last, Upper ...
    Whenever I create a form application, it cannot retrieve the data inside the above tables . It means, the columns Size shows always the literal "Size" . Size actually is an integer number.
    How can I solve this issue ?

    I had the same issue creating grid application, but I found a way to workaround this problem, modifying sql select statement . With form, I do not know how to do it.
    My project is stuck with this.

    Could scriptcase or anybody else provide solution/ workaround ?

  • #2
    I don't know much about SQL Server but afaik you can escape those words using brackets like: select [from] from table;

    Second option is to create a view on the table to map the fields to a unreserved word
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      Create a view with other names for the columns.

      I havent done it myself but I know it can be done in some cases.


      • #4
        Aducom, thanks for the solutions. Both work .
        Thanks to rr for reference as well.