...snip...
>  DBD::AnyData allows you to create your own formats though.  If 
> you don't have embedded '###' in your data, then this simple three line 
> module will allow DBD::AnyData to parse files with '###' as a field 
> separator.  Just Save this file under the name 'ThreeSharp.pm' in the 
> AnyData/Format directory where your copy of AnyData is located:

Say I implement "threesharp" per the post. If I make the first record
before the actual data

name###address###hobby

Will it automagically know when I refer to these fields
w/sql?

Also is it standard to have

###name###address###hobby### vs. the above?

If it's rtfm please link me appreciate the help.





> 
>      package AnyData::Format::ThreeSharp;
>      use base 'AnyData::Format::Base';
>      sub write_fields  { shift; sprintf "%s\n",join '###',@_ }
>      sub read_fields   { split '###', $_[1] }
>      1;
> 
> Then in your perl script do this:
> 
>      use DBI;
>      my $dbh = DBI->connect('dbi:AnyData(RaiseError=1):');
>      $dbh->ad_catalog( $table_name, 'ThreeSharp', $file_name);
>      #
>      # you can now use any SQL you want to access/modify $table_name
>      # results will be stored in $file_name with '###' as a field
>      # separator
> 
> -- 
> Jeff
> 
> 

-- 
http://www.fastmail.fm - Access your email from home and the web

Reply via email to