ID:               24718
 Comment by:       johnr at silver-bullet dot co dot nz
 Reported By:      psychosos at gmx dot at
 Status:           No Feedback
 Bug Type:         ODBC related
 Operating System: Windows 2000 Professional
 PHP Version:      4.3.2
 Assigned To:      kalowsky
 New Comment:

I have a very similar problem with an access database (97 I think). 

The database is password protected and we need the data to import into
a new system - mdbtools and php works a treat, except on one table. 

It will retrieve x records and then crash. Trying to retrieve the next
record (in sequence, after the last successful fetch) also results in a
crash. mdb-export works a treat. 

I suspect that long memo fields are the problem. (I haven't checked
every one but all the ones that failed that I did check had long memo
fields.)

The schema (as reported by mdb-schema) is:
CREATE TABLE Customer
 (
        CustID                  Long Integer (4),
        AccCode                 Text (10),
        StatusFlag              Integer (2),
        SName                   Text (50),
        Initials                Text (50),
        Title                   Text (5),
        Street                  Text (50),
        Suburb                  Text (50),
        City                    Text (50),
        State                   Text (30),
        Post1                   Text (50),
        Post2                   Text (50),
        PostCode                Text (20),
        TeleH                   Text (15),
        TeleW                   Text (15),
        TeleM                   Text (15),
        FaxNo                   Text (15),
        Email                   Text (50),
        Code                    Text (4),
        CreditLimit             Text (20),
        Contact                 Text (50),
        ODInterest              Boolean,
        Preferred               Text (50),
        Notes                   Memo/Hyperlink,
        SendNotice              Integer (2)
);


Previous Comments:
------------------------------------------------------------------------

[2003-11-05 00:35:12] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-10-31 09:55:32] [EMAIL PROTECTED]

You are correct that a LONGCHAR is not supported, 
although I haven't a clue what that would actually be.  
A CHAR, VARCHAR, VARBINARY, LONGVARBINARY would all be 
valid substitutions though.

Can you try changing that and see if this solves your 
problem?

------------------------------------------------------------------------

[2003-07-28 07:14:47] psychosos at gmx dot at

Hello,

Here is a more exact schema of the table called Kommentare, created
with odbc_columns:

TABLE.COLUMN/DATA_TYPE/TYPE_NAME/COLUMN_SIZE
Kommentare.ID/4/INTEGER/10
Kommentare.Kommentar/-1/LONGCHAR/1073741823
Kommentare.Kommentator/12/VARCHAR/50
Kommentare.Datum/11/DATETIME/19
Kommentare.IP/12/VARCHAR/15

So actually column Kommentator it is a VARCHAR, not a Text as I said
before. (That's just how the German version of MS Access likes to call
it.) I have to admit I am not sure whether LONGCHAR is supported
though. Could this be the problem?

You can get the zipped SQLLog for the query "SELECT Kommentar FROM
Kommentare" at http://forum.geizhals.at/files/641/SQL.ZIP (around 4KB).
I hope it helps.

------------------------------------------------------------------------

[2003-07-27 23:38:26] [EMAIL PROTECTED]

Well the start is that type TEXT isn't really supported by ODBC v2
(which is what PHP uses).  If you can change to a type VARCHAR that
would work much better (I can't remember if Access cares about this or
not).  

But for further debugging information, if you can turn on SQLLogging
(under your ODBC Administrator) create the connection, run one of the
queries that crashes everything, and post the results here that would
help.  You might need/want to ensure the removal of the site specific
information (i.e. login and password) before you post it here though.

------------------------------------------------------------------------

[2003-07-24 16:17:10] psychosos at gmx dot at

Sorry about the delay.

The database I am experiencing the problem with is an Microsoft Access
Database I created with MS Access XP.

The problematic table has the following schema:
Table Kommentare
  ID long integer DEFAULT 0 NOT NULL
  Kommentar Memo NOT NULL
  Kommentator Text (50) 
  Datum Date/Time (standard date)
  IP Text(15)
(sorry about non-SQL conformity; I tried to transcribe the MS Access
information)


"SELECT * FROM Kommentare" crashes PHP.
"SELECT ID, Kommentator, Datum, IP FROM Kommentare" works fine.
"SELECT Kommentar FROM Kommentare" crashes PHP.
"SELECT TOP 200 Kommentar FROM Kommentare" works fine as well.
But "SELECT Kommentar FROM Kommentare" crashes PHP.

If needed/helpful I might try to determine the exact number of records
(bytes) which crashes PHP.
Unfortunately I am not experienced debugging applications.

If I can be of any further help I'd be glad to follow your instructions
:-)

Cheers,
johannes

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24718

-- 
Edit this bug report at http://bugs.php.net/?id=24718&edit=1

Reply via email to