Perl/DBI out of the picture, I ran into this problem ("updateable query")
and it related to user permissions on the table.  Try "Admin" uid with its
password or estab. another user.  Use Access to access Access DB first and
try updating.  Then go over to your PL/ODBC script.  Also, try turning on
trace in the ODBC tabs to see more info.  It's permissions though, pretty
sure

-----Original Message-----
From: Ron Rohrssen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 12:17 PM
To: Alan Hogue; [EMAIL PROTECTED]
Subject: RE: Inserting Rows into Access 2000 with DBD::ODBC


Does your table have a primary key?

-----Original Message-----
From: Alan Hogue [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 11:03 AM
To: [EMAIL PROTECTED]
Subject: Inserting Rows into Access 2000 with DBD::ODBC


Hello,

Sorry if this is a terribly stupid question. I've looked
around and can't find the answer to this question. I'd
really appreciate any help or pointers to the information
I need.

I'm trying to write a program that will update a
simple Access 2000 table. Whenever I try to run the
insert statement, though, I get the following error
back:

"
DBD::ODBC::st execute failed: [Microsoft][ODBC
Microsoft Access Driver] Operation must use an
updateable query.
(SQL-S1000)(DBD:st_execute/SQLExecute err=-1) at
dbi_ins_test.pl line 56.
"

This is what the prepared statement looks like:

"
my $sth5 = $dbh->prepare("insert into dbi_test
( district_cd ) values (?)")
        or die "Cant prepare jcdb insert" . $dbh->errstr;
"

...and the execute part looks like:

"
$sth5->execute( $district_cd )
or die "Can\'t insert new records: " . $dbh->errstr;
"

Before this, I bound $district_cd to a column from
another query. I checked, and $district_cd is getting
the value it's supposed to.

I've looked all over the place to figure out what
Access means by "updateable query". In the help files
it says it means I'm trying to update to a special
field of some kind, but I am certain that I am not. I
even tried their "Knowledge Base" with the same
result.

I know this isn't coming from perl or the dbi module,
but has anyone run into this kind of problem before
with Access? I'd appreciate any help, as I am banging
my head against a wall at this point.

Thanks,
Alan


Reply via email to