Menu

#6 Pear nextId() function does not create new sequence table

open
nobody
None
5
2014-12-20
2005-09-24
Nubbsi
No

Hi

I'm using odbtp to access an MS Access mdb File via
php. Fetching Data with PEAR-DB and odbtp works fine.
So I think everything is well configured.

Now i need to insert new data values and wanted to use
the nextId() method. But the method fails with an
'Unknown Error', which is not the right behavior. I
made some debug outputs and figured out that the error
code is not set right.

Its a german access version so the error message is
german too. But as you can see, the nativecode is 42S02
which stands for an unknown table.
The code of the DB_Error Object should be 42S02 not -1.
With this wrong error code, the method would not
create the sequence table.

DB_Error Object
(
[error_message_prefix] =>
[mode] => 1
[level] => 1024
[code] => -1
[message] => DB Error: unknown error
[userinfo] => UPDATE angebote_seq SET id = id + 1
[nativecode=[42S02][-1305][Microsoft][ODBC Microsoft
Access Driver] Das Microsoft Jet-Datenbankmodul findet
die Eingangstabelle oder Abfrage 'angebote_seq' nicht.
Stellen Sie sicher, dass sie existiert und der Name
richtig eingegeben wurde.]
[backtrace] => Array
(
[0] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB.php
[line] => 888
[function] => PEAR_Error
[class] => DB_Error
[type] => ->
[args] => Array
(
[0] => DB Error: unknown error
[1] => -1
[2] => 1
[3] =>
[4] => UPDATE angebote_seq
SET id = id + 1
[nativecode=[42S02][-1305][Microsoft][ODBC Microsoft
Access Driver] Das Microsoft Jet-Datenbankmodul findet
die Eingangstabelle oder Abfrage 'angebote_seq' nicht.
Stellen Sie sicher, dass sie existiert und der Name
richtig eingegeben wurde.]
)

)

[1] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\PEAR.php
[line] => 557
[function] => DB_Error
[class] => DB_Error
[type] => ->
[args] => Array
(
[0] => -1
[1] => 1
[2] =>
[3] => UPDATE angebote_seq
SET id = id + 1
[nativecode=[42S02][-1305][Microsoft][ODBC Microsoft
Access Driver] Das Microsoft Jet-Datenbankmodul findet
die Eingangstabelle oder Abfrage 'angebote_seq' nicht.
Stellen Sie sicher, dass sie existiert und der Name
richtig eingegeben wurde.]
)

)

[2] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB\common.php
[line] => 1849
[function] => raiseError
[class] => DB_odbtp
[type] => ->
[args] => Array
(
[0] =>
[1] => -1
[2] =>
[3] =>
[4] => UPDATE angebote_seq
SET id = id + 1
[nativecode=[42S02][-1305][Microsoft][ODBC Microsoft
Access Driver] Das Microsoft Jet-Datenbankmodul findet
die Eingangstabelle oder Abfrage 'angebote_seq' nicht.
Stellen Sie sicher, dass sie existiert und der Name
richtig eingegeben wurde.]
[5] => DB_Error
[6] => 1
)

)

[3] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB\odbtp.php
[line] => 943
[function] => raiseError
[class] => DB_odbtp
[type] => ->
[args] => Array
(
[0] => -1
[1] =>
[2] =>
[3] =>
[4] =>
[42S02][-1305][Microsoft][ODBC Microsoft Access Driver]
Das Microsoft Jet-Datenbankmodul findet die
Eingangstabelle oder Abfrage 'angebote_seq' nicht.
Stellen Sie sicher, dass sie existiert und der Name
richtig eingegeben wurde.
)

)

[4] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB\odbtp.php
[line] => 542
[function] => odbtpRaiseError
[class] => DB_odbtp
[type] => ->
[args] => Array
(
)

)

[5] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB\common.php
[line] => 1162
[function] => simpleQuery
[class] => DB_odbtp
[type] => ->
[args] => Array
(
[0] => UPDATE angebote_seq
SET id = id + 1
)

)

[6] => Array
(
[file] =>
c:\eclipse\workspace\ImmoDB\export\immoXML\pear\DB\odbtp.php
[line] => 775
[function] => query
[class] => DB_odbtp
[type] => ->
[args] => Array
(
[0] => UPDATE angebote_seq
SET id = id + 1
)

)

.... some more lines

Discussion


Log in to post a comment.