Gossamer Forum
Home : Products : DBMan : Discussions :

DB Search Failed

Quote Reply
DB Search Failed
I am having trouble with an old DBMan. This file was set up for me by someone else quiet a few years ago. I know nothing about cgi, dbMan, .pl, etc. Any way, I just moved the site to a new sever a few months ago (not sure if that is my problem or if it is something else-- it seemed to be working after that was done). Just this week, I updated the .db file through a text editor - I am pretty sure I did this like I always have. Now the search on my html page isn't working properly. If I type in a city that I know is on my db file, nothing comes up, as well as if I type in a state. Some things work but most of it does not.

Can anyone help me?Crazy
I have zipped the db, cgi, cfg, html.pl

Here is a link to my html page: http://www.bsi-inc.com/Pages/hobby/hdealer/index.html
Deborah
Quote Reply
Re: [s101] DB Search Failed In reply to
It looks like your db is out of order... everything is in the wrong place.

Make sure the fields in your default.db line up with your default.cfg

Name
Address
City
State
Zip

Name|Address|City|State|Zip

if there is an empty field it should look like this:

Name||City|State|Zip (notice how there's a space/placeholder for address between the two pipes)

If you have excel you can open the default.db file in excel (tell it "other delimiter" and type in the pipe in the box) then you can "see" where your fields are getting off. If you miss a space for field

Name|City|State|Zip (notice there is no placeholder for address) then your search will return records like this:

Name|City|State|Zip|Name
Address|City|State|Zip|Name

Hope this makes sense...
Quote Reply
Re: [Watts] DB Search Failed In reply to
YES, that does make sense. Thanks!

Looks like I need to add a couple more fields to my search form (since my client added international companies, some with addresses and some without), but I don't know how to do that either. FrownDo I do that on the default.cfg? Do I do it in more than one place? I am not sure how to make the fields come up on my html page either.

This is what I am needing:
Name
Address
City
State
Zip
Country
Phone 1
Phone 2

Thanks so much for all your help!
Deborah
Quote Reply
Re: [s101] DB Search Failed In reply to
You new fields would need to be added to your .cfg file, and then also to the sub html_record_form within the .pl file. Every field in the .cfg file must have a matching field in this section.

Then to display the field contents you would add them to sub html_record or sub html_record_long depending on whether you have the short/long mod in use.

Not sure how your database is setup and what mods you are using.

For fields that don't currently have entries you may want to be sure to mark them to not be required.

For the current records you will need to add extra pipes in the .db file at the end of those records for the additional fields you add.

There is great tutorials for using dbman at http://jpdeni.com/dbman/

Also in the DBMan FAQ you will find all kinds of answers on how to work with DBman.

Hope this helps

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/