Problem with "_" starting column names

2003-09-19
2003-12-08
  • Marc Gracia
    Marc Gracia
    2003-09-19

    I need to create column names starting with "_" using DBD::InterBase. In interbase those columns are not accepted, raising a "Token Unknown" error.
    At first I saw that, as Oracle, those column names can be used embracing it with quotes.
    I tried it in isql Interbase application and worked great. But using DBD always says "Token Unknown". I've tried to make sure ib_dialect is 3 (I read somewhere there are problems with quotes) but it doesn't solved it.
    I'm desesperated y really need to access to that kind of column names....

     
    • Edwin Pratomo
      Edwin Pratomo
      2003-12-08

      The database must be of dialect 3. Try check the dialect first either by running gstat -h, or by issuing show sql dialect in isql.
      Then connect uisng the DBD with ib_dialect=3, and create the field name inside double quotes.

      $dbh->do(q/create table foo ("_id" int)/);