http://www.perlmonks.org?node_id=324587


in reply to Re: DBD::ANYDATA create table help please.
in thread DBD::ANYDATA create table

Sorry for the formatting, I'll try posting as code (should have read further!) I think your approach will work if you change $ladder_table_fields so that it has the datatypes (not just the field names), i.e.  my $ladder_table_fields = "player_name varchar2(30), id varchar2(9), position varchar2(30)"; # etc., this would work in Oracle Also, change $sth->execute( $@sql_parameters ); to  $sth->execute( $ladder_table, $ladder_table_fields[0], $ladder_table_fields[1] # etc. I tested something like you had where you wanted to pass in the field names as a list (array), but I couldn't get $sth->execute to see it in a list context. Passing it as individual scalars worked.

Replies are listed 'Best First'.
Re: Re: Re: DBD::ANYDATA create table help please.
by Roger (Parson) on Jan 28, 2004 at 01:08 UTC
    $sth->execute( $ladder_table, $ladder_table_fields[0], $ladder_table_fields[1],...
    You probably meant this instead... :-)
    $sth->execute( $ladder_table, @ladder_table_fields );

      Actually I couldn't get

      $sth->execute( $ladder_table, @ladder_table_fields ); to work.

      I didn't think of join, like in your example.

      Does it (the array as a list) work on your installation?