Filemaker ODBC connection

  • Thread starter Robert Henniger
  • Start date
R

Robert Henniger

Hi to all.

Today i tried to open an ODBC connection to an local filemaker
database.
The SELECT Statement works fine.

The UPDATE AND the INSERT statements are not working.

##########################################################

use DBI;

my $db_connect_string_fmpro = 'fm_test';
my $filemaker_database_name = 'fm_database';
my $fm_user = "xxxxx";
my $fm_pass = "xxxxx";
my $debug=0; # DBI tracing enable/disable
my $long_readlength = 100000;



my $fmpro_dbh = DBI->connect ("dbi:ODBC:$db_connect_string_fmpro",
$fm_user, $fm_pass, {RaiseError => 1, PrintError => 1, AutoCommit =>
0}) or die "Can't connect to the FileMaker $db_connect_string_fmpro
database: $DBI::errstr\n";
$fmpro_dbh->{LongReadLen} = $long_readlength;
$fmpro_dbh->{LongTruncOk} = 0;


my $fmpro_sth = $fmpro_dbh->prepare("update mytable SET id = 123 WHERE
id = '33382'");
$fmpro_sth->execute();

##########################################################

Are there any limitions for the ODBC Interface?
I am using Filemaker 8.5 PRO.

Thanks in advice.

best regards
robert
 
G

Graham Wood

Robert said:
The SELECT Statement works fine.
The UPDATE AND the INSERT statements are not working.

##########################################################
my $fmpro_sth = $fmpro_dbh->prepare("update mytable SET id = 123 WHERE
id = '33382'");
Could it be that id is a number and '33382' is a text because it is
enclosed in quotes?

You haven't given a lot of information about what "are not working"
means? You could try dying and printing $DBI::errstr if your prepare
and execute statements fail. It might tell you why they failed.

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top