in reply to Re: Add Text record to access table?
in thread Add Text record to access table?

You might want to look at DBI with DBD::ODBC. Many database do not allow the insertion of text and blob fields with straight insert statements (Informix, for one). In DBI one can use placeholders when inserting to do so. Placeholder will also automatically quote fields properly, removing another hassle.
Assuming (and in all fairness I have not used it) that DBD::ODBC is as complete a driver as the others I have used (mysql, oracle, informix), you should find that it does what you want.
It would lokk roughly like:
my $dbh = DBI->connect(connect params...) or die "connect failed: $ +DBI::errstr"; $dbh->do("insert into table (a,b,c) values(?,?,?)",{}, 3,$x,$long_text_field_or_blob_data) or die "do failed: $DB +I::errstr";

All the quoting and blob magic needed is done by the DBD driver.

-pete
Entropy is not what is used to be.

Replies are listed 'Best First'.
Re: Re: Re: Add Text record to access table?
by Anonymous Monk on Feb 20, 2002 at 13:56 UTC
    What is connect param?
      The arguments to connect are DB specific parameters such as the type of db, the name of the db, and username/password info.
      DBI and the DBD::xxx documentation (where xxx is the name of your database, i.e. DBD::Oracle) will give you more information on the parameters needed for your particular db.

      -pete
      Entropy is not what is used to be.
Re: Re: Re: Add Text record to access table?
by manoorani (Novice) on Feb 26, 2002 at 18:42 UTC
    Thanks pete, that helped.