Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Unanswered: ODBC connection with MS Access

    Hi everyone,

    I am trying to export an MS Access table into DB2. I am not sure if I have done it right. I have selected ODBC as export option in Access and finally I am able to see my exported table (Exporttable) when issuing the command
    >> db2 list tables
    in DB2. (Same schema [MYUSERNAME] and type as the other tables, yet it is a bit strange that the table is not shown in uppercase letters 'EXPORTTABLE' as all the other tables but as 'Exporttable'' instead)
    I am not able to access this table from db2 at all. Executing a command like:

    >> db2 select * from Exporttable

    I get the following error message

    >> SQL0204N "MYUSERNAME.TARGET" is an undefined name. SQLSTATE=42704

    Thanks for any help...

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    mix case

    as tablename is in mix case, the name has to be protected from translation
    select * from "tablename"
    same applies to column names
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    Quote Originally Posted by Mehico12
    >> db2 select * from Exporttable

    I get the following error message

    >> SQL0204N "MYUSERNAME.TARGET" is an undefined name. SQLSTATE=42704

    Thanks for any help...
    Table name consist of two parts. Schema + tabname. reffer to it as such to avoid this in the future. It is a good practice to do so for many reasons. Runs this command to see what schema was this table created in and then post here. db2 list tables for all | grep -i tabname tabname is your table name.
    Last edited by Cougar8000; 11-22-05 at 10:04.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

Posting Permissions

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