Gossamer Forum
Home : Products : DBMan : Customization :

Default Values Problem

Quote Reply
Default Values Problem
Hello All. Thanks for the prior help -- I'm moving right along with building my database (even if it's at the newbie level ;-)

I used JPDeni's configurator to get me started -- and of course, it gave me new default.cfg and html.pl files. Two problems: I entered 0 (zero) for the default values in some fields and they're not showing up at all (I need the fields to show up, even if they're blank or zero); the other problem is that I entered $ as a default value and now realize the error of my ways -- I do not want those fields to show up if empty.

I went into the default.cfg file and deleted the $'s -- saved, and reuploaded, but they're still showing. My 0's -- I have no idea how I fix this problem.

Any help? Much appreciated!

Victoria ;-)



Quote Reply
Re: Default Values Problem In reply to
The $'s will still be showing because they have probobly been entered into the record. You'll have to check you .db file.

As for the 0, perl probobly thinks the 0 means "null". If you havent already, try setting the default as '0' (ie: with single quotes). See if that helps.

Good luck!

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Default Values Problem In reply to
Wow! I've never visited a help forum which was quicker to help. Much thanks and kudos to you.

You're right about the $ marks -- I didn't think of that. But now I'm re-thinking my problem with the zeros, and think I explained my problem with them incorrectly.

I'm putting information into a table with columns and rows -- in this case, it's a horse's race record. For entering/searching, I've provided fields for a horse racing from 2-yrs-old until he's 9-yrs-old (very unlikely to go over that).

Secretariat's record may look like this (starts, wins, 2nd, 3rd, earnings):
21 16 2 2 0 $1,500,000

My real problem here is that when typing in the zero in the field, it reads it as a null? and that cell of my table is skipped completely. But I need the program to read that zero that is entered by myself or the user. So my question is why the program isn't reading zeros, and how to make it read zeros?

Thanks!


Quote Reply
Re: Default Values Problem In reply to
It's best to not add the dollar sign and commas in the default value.

You could however add them to the display. Please visit the FAQ noted below and look under the section "Syntax" for a thead titled "Commas & Dollar Signs".

This will provide the solution you need for entering and displaying the dollar signs and commas.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/