Results 1 to 2 of 2

Thread: SQL table name errors (SQL query)

  1. #1
    Stuart Paice Guest

    SQL table name errors (SQL query)


    hi,
    i am having trouble with SQL queries.

    for example i have table names like [C/C++], [tmp-column] and [slash/column]

    in the aspdb code i have contained the the name as above BUT when it comes to ordering the column from the web page it places the name in without the [] brackets, therefore looking for C/C and + and + as seperate entities. also when adding to the database it hase the same problem.

    is there anyway i can force aspdb to place [] brackets around all querry variables or do i have to rename them in the Database and rename them within the aspdb code.

    thank you stuart

  2. #2
    John Guest

    SQL table name errors (SQL query) (reply)

    Hi Stuart,

    You can use dbNameMap to "rename" your fields to look however you wish.

    That's the best way to get "illegal" field names to show up and work correctly.

    There are a whole host of "no-nos" that you're supposed to avoid in field names. They include spaces, slashes, quotes, mathematical symbols, etc. If it doesn't catch you today, it will catch you tomorrow when you upsize to another database. I'd suggest you bite the bullet and clean the names up now, and use dbNameMap to show whatever custom names you wish.

    Thanks,
    John



    ------------
    Stuart Paice at 2/14/2002 8:08:18 PM


    hi,
    i am having trouble with SQL queries.

    for example i have table names like [C/C++], [tmp-column] and [slash/column]

    in the aspdb code i have contained the the name as above BUT when it comes to ordering the column from the web page it places the name in without the [] brackets, therefore looking for C/C and + and + as seperate entities. also when adding to the database it hase the same problem.

    is there anyway i can force aspdb to place [] brackets around all querry variables or do i have to rename them in the Database and rename them within the aspdb code.

    thank you stuart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •