in reply to DBI w/ AnyData...works except on a couple of files...

I found the source after re-testing again (I could swear I tried this the first pass through...:-p Oh well).

The problem was with the '/' char in the field name "AMA/FAI". Removing it solved the problem.

Something to keep in mind...I do believe that there are other 'illegal' characters such as (I believe) single quotes and dash characters that will produce the same result if used in a field name so be careful with your field names people!

Suprisingly, I found NOTHING directly about this via web search engines and in the archives of the various Perl forums I frequent. Hopefully someone will find it here.

Ciaoness

======================
Sean Shrum
http://www.shrum.net

  • Comment on Re: DBI w/ AnyData...works except on a couple of files...

Replies are listed 'Best First'.
Re: Re: DBI w/ AnyData...works except on a couple of files...
by jZed (Prior) on Mar 22, 2002 at 06:19 UTC
    Sorry I didn't see this earlier, I'm more likely to see things on comp.lang.perl.modules or dbi-users@perl.org. If you use the newest version of SQL::Statement with DBD::AnyData, it will catch those kinds of mistakes and warn you about them. It follows the SQL standard that names are composed of only alphanumerics and underscore and must start with an alphbetic character and be no longer than 128 characters and not be the same as a SQL reserved word. SQL Statement now allows quoted identfiers so characters like spaces and slashes are acceptable if used inside quotes. -- Jeff (author of the mods in question)
      I'm currently seeing problems with embedded newlines in CSV files.
      Eg. data like the following file
      C:\TEMP>cat events.csv
      UKEY,CITY,DATE,TIME,TITLE,LOCATION,TYPE
      unkey1,perth,27-mar-03,3:15,"guru
      god",office,1
      unkey2,Melb,12-mar-03,3:15,"at last, at home",home,1
      
      on code like
      my $sth = $dbh->prepare("SELECT location, title FROM things"); $sth->execute(); while (my $row = $sth->fetch) {print "@$row\n"; }

      Version information

      • DBD::Anydata 0.05
      • SQL::Statement 1.005
      • Perl v5.6.1 built for MSWin32-x86-multi-thread