Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

V1.11-> Bad name Error

Quote Reply
V1.11-> Bad name Error
I have searched the forum archives (only found two threads where the Bad name error was discussed, but in different contexts than what I am dealing with) and I also searched MySQL web site for info on Bad name errors to no avail.

I am attempting to add records into a table called Jobs_Validate in another database than the main Links database.

Here is the error I receive:

In Reply To:

DBSQL (2065): Fatal Error: Error loading Config file '/absolute/path/to/defs/career/Jobs_Validate.def'. Reason: Parse Error: Bad name after LONGTEXT' at /absolute/path/to/defs/career/Jobs_Validate.def line 39, <INC> chunk 154. at /bin/addjobs.cgi line 255


Here is line 38 - 54 in the Jobs_Validate.def file:

In Reply To:

CurrencyID => ['20','SMALLINT', '10, '20', '1', '', ''],
Benefits => ['21','LONGTEXT','40x3','500','0','', ''],
RemoveDate => ['22','SMALLINT', '3', '3', '1', '', ''],
Add_Date => ['23','DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
Mod_Date => ['24','DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
Hits => ['25','SMALLINT','10', '20','0','', ''],
ReceiveRes => ['26','ENUM', '1','1','1','Y','Y|N'],
Active => ['27','ENUM', '1','1','1','Y','Y|N'],
Mode => ['28','ENUM', '0','8', '1', 'Validate', 'Validate|Modify']
);

%db_select_fields = ( Mode => 'Validate,Modify');
%db_checkbox_fields = ();
%db_radio_fields = ( ReceiveRes => 'Y,N',
Active => 'Y,N');

1;


Here is line 255 in the addjobs.cgi script:

In Reply To:

$val = new Links::DBSQL $LINKS{admin_root_path} . "/defs/career/Jobs_Validate.def";


I have browsed the Jobs_Validate.def file over and over again and I cannot see what could be causing the error.

Any thoughts or suggestions for fixing the error are greatly appreciated.

Thanks in advance.

Regards,

Eliot Lee
Quote Reply
Re: V1.11-> Bad name Error In reply to
Only a thought and maybe not helpful:

Try to use the normal var-declaration: char
I have textfields with 5000 chars running as char (in the def! not in mysql!)

Robert

Quote Reply
Re: V1.11-> Bad name Error In reply to
Thanks, Robert. However, I don't know why LONGTEXT field types in the main Links def files work just fine...no errors, but in the other tables in the other databases, there a slew of errors, including the one I posted....I will give it a shot...but the logic alludes me.

Regards,

Eliot Lee
Quote Reply
Re: V1.11-> Bad name Error In reply to
Are you creating the def file manually?

In my def files, I only see the types char/int/smallint/date/datetime

What happens if you change the def file to just the standard definitions?

I haven't hit that error in any of the work I've done, so I can't be of more help.... but all my .def files only have the 5 types above in them.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: V1.11-> Bad name Error In reply to
In Reply To:
Are you creating the def file manually?
Yes...because I have not succesfully hacked setup.cgi to build tables in different databases in a seamless manner. Plus, anytime I re-setup the tables, I had to go back and change the Index weights, which was time-consuming...

In Reply To:
I haven't hit that error in any of the work I've done, so I can't be of more help.... but all my .def files only have the 5 types above in them.
Actually, I have been able to use TEXT, SMALLTEXT, LONGTEXT field types in my definition files with no problem until I tried adding records into other databases...

The problem I found was a missing single quotation mark after 10 in the CurrencyID field and there were some columns missing in some of the fields...so, after cleaning up the .def file...I can now add data into the other tables in the other databases.

Thanks again for your replies, guys.


Regards,

Eliot Lee
Quote Reply
Re: V1.11-> Bad name Error In reply to
Well... those darn little ' will get you every time :)

That's why auto-generating the file is so cool. '' can also look like " in many editors.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ