RE: Couldn't write to Ms Access Database by DBD:ODBC
by other posts by this author
Oct 19 2000 3:06PM messages near this date
Re: hashes
|
Re: Installing DBD::Oracle
Would any one know much about installing DBD::Oracle ?
Thanks
Niran
> -----Original Message-----
> From: Steve Lloyd [SMTP:slloyd@[...].com]
> Sent: Thursday, 19 October 2000 16:07
> To: Hai Trieu, Nguyen
> Cc: dbi-users@[...].org
> Subject: Re: Couldn't write to Ms Access Database by DBD:ODBC
>
> Try updating your ODBC driver. Looks like you have tried everything
> else.
>
> Steve Lloyd
> Datigen.com
>
> "Hai Trieu, Nguyen" wrote:
>
> > Yes Steve, the error occurred in EXECUTE statement, exactly the same
> > as DO's error.(of course i believe PREPARE statement rarely generate
> > error except wrong queries).haitrieu
> >
> > ----- Original Message -----
> > From: Steve Lloyd
> > To: Hai Trieu, Nguyen
> > Sent: Thursday, October 19, 2000 6:15 AM
> > Subject: Re: Couldn't write to Ms Access Database by
> > DBD:ODBC
> > Have you tried using prepare/execute instead of do? This
> > will tell you if the problem is in preparing or executing
> > the sql query... Perhaps it is a DBI
> > issue...
> >
> > $sth = $dbh->prepare($sql)||print "error = $DBI::errstr";
> > $sth->execute()||print "error = $DBI::errstr";
> >
> > Steve
> >
> > "Hai Trieu, Nguyen" wrote:
> >
> > > Hi Ilya,
> > > Thanks for your advice, but unfortunately all possible
> > causes you mentioned are not applicable in this case:
> > > - the DSN in ODBC Manager was not set to READONLY.
> > > - the Database has only one table with 2 fields : ID
> > (Number), Name (Text).
> > > So the key field is ID has type of Number (not
> > Autonumber), and i think this couldn't be the reason because
> > i not only tried to INSERT but also UPDATE.
> > > Is there any reason else?
> > > haitrieu.
> > > ----- Original Message -----
> > > From: Ilya Sterin
> > > To: Hai Trieu, Nguyen ; dbi-users@[...].org
> > > Sent: Tuesday, October 17, 2000 7:35 PM
> > > Subject: RE: Couldn't write to Ms Access Database by
> > DBD:ODBC
> > >
> > > Can be a few different causes.
> > > First, in ODBC manager the dsn might be set to read
> > only. See if that's
> > > true and change.
> > > Another if ID is a unique primary key, in ACCESS you
> > cannot update, it will
> > > automatically generate any time you insert.
> > >
> > > Ilya Sterin
> > >
> > > ------Original Message------
> > > From: "Hai Trieu, Nguyen" <haitrieu@[...].com>
> > > To: <dbi-users@[...].org>
> > > Sent: October 17, 2000 7:56:20 AM GMT
> > > Subject: Couldn't write to Ms Access Database by
> > DBD:ODBC
> > >
> > > Hi all!
> > > Can anyone tell me how to solve this problem:
> > > I tried updating the database in Ms Access format (.mdb)
> > by using DBD::ODBC
> > > (on IIS/ win2000). But i could only read (by SELECT) the
> > data, could not
> > > write (by INSERT INTO, or UPDATE).
> > > When I trace DBI::errstr, it was :
> > > "[Microsoft][ODBC Microsoft Access Driver] Operation
> > must use an updateable
> > > query. (SQL-S1000)(DBD: st_execute/SQLExecute err=-1) "
> > >
> > > I'm sure every read/write security was correctly set,
> > some of my script is:
> > >
> > > use DBI;
> > > $dbh = DBI->connect("DBI:ODBC:Save", "admin","pass");
> > > $sql = "INSERT INTO Data (ID, Name) VALUES (3, 'Peter'
> > )";
> > > $dbh->do($sql) or print "error = $DBI::errstr";
> > > $dbh->disconnect;
> > >
> > > # Save is the DSN
> > >
> > > I tried to replace DO command by PREPARE and EXECUTE but
> > it generated the
> > > same error.
> > > I'll preciate any suggestion.
> > > Thanks.
> > >
> > >
> >
> --------------------------------------------------------------------------
> ----
> >
> > > DBI HOME PAGE AND ARCHIVES:
> > http://www.symbolstone.org/technology/perl/DBI/
> > > To unsubscribe from this list, please visit:
> > > http://www.isc.org/dbi-lists.html
> > > If you are without web access, or if you are having
> > trouble with the web
> > > page,
> > > please send mail to dbi-users-request@[...].org with the
> > subject line of:
> > > 'unsubscribe'.
> > >
> >
> --------------------------------------------------------------------------
> ----
> >
> > >
> > > ______________________________________________
> > > FREE Personalized Email at Mail.com
> > > Sign up at http://www.mail.com/?sr=signup
> > >
> > >
> >
> --------------------------------------------------------------------------
> ----
> >
> > > DBI HOME PAGE AND ARCHIVES:
> > http://www.symbolstone.org/technology/perl/DBI/
> > > To unsubscribe from this list, please visit:
> > http://www.isc.org/dbi-lists.html
> > > If you are without web access, or if you are having
> > trouble with the web page,
> > > please send mail to dbi-users-request@[...].org with the
> > subject line of:
> > > 'unsubscribe'.
> > >
> >
> --------------------------------------------------------------------------
> ----
> >
>
>
>
> --------------------------------------------------------------------------
> ----
> DBI HOME PAGE AND ARCHIVES:
> http://www.symbolstone.org/technology/perl/DBI/
> To unsubscribe from this list, please visit:
> http://www.isc.org/dbi-lists.html
> If you are without web access, or if you are having trouble with the web
> page,
> please send mail to dbi-users-request@[...].org with the subject line of:
> 'unsubscribe'.
> --------------------------------------------------------------------------
> ----
------------------------------------------------------------------------------
DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/
To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-users-request@[...].org with the subject line of:
'unsubscribe'.
------------------------------------------------------------------------------
Thread:
Michael A. Chase
|