Gossamer Forum
Home : Products : DBMan : Discussions :

User ID gets placed in counter field

Quote Reply
User ID gets placed in counter field
I have a really strange problem that I can't find a fix for:

I am setting up a new installation of DBMan - everything is working fine, except for this problem. I have a field set up for an ID number to be assigned by DBMan. I used JPDeni's Configurator to get it all set up. The ID field is my primary key and is supposed to be automatically incremented by DBMan.

When the "Add Record" screen comes up, it displays the correct next ID number. But, when I add a new record, DBMan puts the users login in the ID field.

So instead of returning "101", it returns "admin"

When I look in the default.count, it reads only "admin" If I add more records, it increments admin! Then the default.count reads "admio" then "admip" and so on!

I have tried deleting all records and changing default.count to be "101" - didn't help. I tried adding 5 records, going into default.db and manually changing them to 101,102,103,104,105 then setting default.count to 106 - didn't help!

If I log in as "author" I can't add any records because it tells me that my ID is too long (it's limited to 5 characters).

I searched through html.pl and default.cfg for "ID" to see if something was messed up somewhere - everything looked fine. DBMan uses userid for the user login id, so it shouldn't be confused, but somehow it is. Any ideas?

Here is the code from by db files:

From default.cfg
'ID'=> [ 0,'numer',5,5,1,'',''],
$db_key = 'ID';
$db_key_track = 1;

From html.pl
<INPUT TYPE="TEXT" NAME="ID" SIZE="5" VALUE="$rec{'ID'}" MAXLENGTH="5">
Quote Reply
Re: [bpet] User ID gets placed in counter field In reply to
I reinstalled the sample DBMan database and found that it DID work ok - So I knew it was something that I had changed or that had been changed while using the Configurator. So, I went back and compared the default.cfg for the sample database and my own database.

The problem was in the setting for $auth_user_field under the Authorization Options in default.cfg

Mine was set to 0 from the Configurator. I set it to -1 as per the instructions above it since I am not using that option.

Now it works fine! :)
Quote Reply
Re: [bpet] User ID gets placed in counter field In reply to
I just had the same problem and made the same change. Now my ID is always 1. It doesn't increase with each record. Did you have this problem?