Click to See Complete Forum and Search --> : Runtime Error


wpahiker
10-31-2006, 09:23 AM
I am writing information to a DBM file (actually, filling in the hash at the time) when I got the following error:

sdbm store returned -1, errno 22, key "Beaver High Adventure Base" at basedb.cgi line 28, <BASES> chunk 2.

Any idea what this means? Lines 28 contains:

$BASES {$Base} = qq($Council\t$BLastUpdate\t$BAddr\t$BCity\t$BState\t$BZip\t$BPhone\t$BFax\t$BWebsite\t$BEmail\t$BDir \t$MQCity\t$MQState\t$MQZip\t$BDesc\t$BRestr\t$BProgram);

What I am lacking is: what is errno 22? What is chunk 2?

I thought at first that the key was too long, but just before adding this record to the hash I added another record with an even longer key.

Mike

CyCo
10-31-2006, 04:46 PM
The first part of the error (sdbm store returned -1, errno 22, key "Beaver High Adventure Base" at basedb.cgi line 28) is the typical error returned when the length of a key, plus the length of its associated value is greater than 1008 bytes.

Not sure about the other part.

Just a note...

The line below is 21 characters long: (44 bytes)
magical mystery tours The line below is 21 characters long: (21 bytes)i am so sad to be bad
...if you get my drift.

wpahiker
10-31-2006, 07:35 PM
1) Is the length limit because of a hash or a DB record?

2) 44 byte? Don't understand

wpahiker
11-01-2006, 07:40 AM
Is there any way around the 1008 byte limit?

Jeff Mott
11-01-2006, 03:09 PM
Have a look into the MLDBM::Sync module instead of the SDBM module. The only downfall is that MLDBM::Sync does not come prepackaged with Perl; you will need to download and install it yourself.