OK I changed everything back. Where do I go from here?
Aug 5, 1999, 2:05 PM
Veteran / Moderator (8669 posts)
Aug 5, 1999, 2:05 PM
Post #27 of 48
Views: 7530
Aug 5, 1999, 2:30 PM
Novice (33 posts)
Aug 5, 1999, 2:30 PM
Post #28 of 48
Views: 7538
At this stage I'm trying to get back to where I was some time ago. It appears to me that the log on screen will not allow log ons. When I enter data and hit logon, it blinks like it is doing something but just returns me to the logon screen. Here is the pertinent parts of default.cfg:
%db_def = (
'ID' => [0, 'numer', -2, 50, 0, '', '' ],
'First Name' => [1, 'alpha', 20, 50, 1, '', '' ],
'Last Name' => [2, 'alpha', 20, 50, 1, '', '' ],
'Maiden Last Name' => [3, 'alpha', 20, 50, 0, '', '' ],
'Class of' => [4, 'numer', 4, 4, 0, '1949', '' ],
'Address' => [5, 'alpha', 20, 50, 0, '', '' ],
'City' => [6, 'alpha', 20, 50, 0, '', '' ],
'State' => [7, 'alpha', 20, 50, 0, '', '' ],
'Zip' => [8, 'numer', 20, 50, 0, '', '' ],
'Home Phone' => [9, 'numer', 20, 50, 0, '', '' ],
'Work Phone' => [10, 'numer', 20, 50, 0, '', '' ],
'Fax Number' => [11, 'numer', 20, 50, 0, '', '' ],
'Birthday' => [12, 'alpha', 20, 50, 0, '', '\d' ],
'Email' => [13, 'alpha', 20, 50, 0, '', '\@' ],
'ICQ#' => [14, 'numer', 20, 50, 0, '', '' ],
'Home Page' => [15, 'alpha', 20, 50, 0, '', '' ],
'Occupation' => [16, 'alpha', 20, 50, 0, '', '' ],
'Biography' => [17, 'alpha', 40x3, 120, 0, '', '' ]
);
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 0;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 1;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 1;
# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);
# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );
# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );
# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generation and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';
# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;
# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)
# Enable (1) or disable (0) logging.
$auth_logging = 1;
# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 0;
# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,1,0,0,0);
# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;
# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;
# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 1;
# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = -1;
# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
$auth_logoff = ".";
Several times I thought I had it going right but I made one last tweak and I'm screwed up. I imagine you are sick of it by now.
%db_def = (
'ID' => [0, 'numer', -2, 50, 0, '', '' ],
'First Name' => [1, 'alpha', 20, 50, 1, '', '' ],
'Last Name' => [2, 'alpha', 20, 50, 1, '', '' ],
'Maiden Last Name' => [3, 'alpha', 20, 50, 0, '', '' ],
'Class of' => [4, 'numer', 4, 4, 0, '1949', '' ],
'Address' => [5, 'alpha', 20, 50, 0, '', '' ],
'City' => [6, 'alpha', 20, 50, 0, '', '' ],
'State' => [7, 'alpha', 20, 50, 0, '', '' ],
'Zip' => [8, 'numer', 20, 50, 0, '', '' ],
'Home Phone' => [9, 'numer', 20, 50, 0, '', '' ],
'Work Phone' => [10, 'numer', 20, 50, 0, '', '' ],
'Fax Number' => [11, 'numer', 20, 50, 0, '', '' ],
'Birthday' => [12, 'alpha', 20, 50, 0, '', '\d' ],
'Email' => [13, 'alpha', 20, 50, 0, '', '\@' ],
'ICQ#' => [14, 'numer', 20, 50, 0, '', '' ],
'Home Page' => [15, 'alpha', 20, 50, 0, '', '' ],
'Occupation' => [16, 'alpha', 20, 50, 0, '', '' ],
'Biography' => [17, 'alpha', 40x3, 120, 0, '', '' ]
);
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 0;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 1;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 1;
# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);
# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );
# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );
# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generation and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';
# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;
# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)
# Enable (1) or disable (0) logging.
$auth_logging = 1;
# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 0;
# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,1,0,0,0);
# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;
# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;
# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 1;
# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = -1;
# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
$auth_logoff = ".";
Several times I thought I had it going right but I made one last tweak and I'm screwed up. I imagine you are sick of it by now.
Aug 5, 1999, 2:51 PM
Veteran / Moderator (8669 posts)
Aug 5, 1999, 2:51 PM
Post #29 of 48
Views: 7597
Oh, I have moments when I'm pretty patient. (And then there are other moments!)
Since you've changed servers, have you been able to get the demo to run?
I see a problem with your .cfg file.
You have
$auth_modify_own = 1;
$auth_view_own = 1;
and
$auth_user_field = -1;
If you want users to only be able to modify and view their own records, you will need to have an $auth_user_field.
If you haven't tried the demo on your new server, I would do that first, though. Let's just be sure that paths and stuff are right before we go on. (I'm a real believer in "one step at a time." )
------------------
JPD
Since you've changed servers, have you been able to get the demo to run?
I see a problem with your .cfg file.
You have
$auth_modify_own = 1;
$auth_view_own = 1;
and
$auth_user_field = -1;
If you want users to only be able to modify and view their own records, you will need to have an $auth_user_field.
If you haven't tried the demo on your new server, I would do that first, though. Let's just be sure that paths and stuff are right before we go on. (I'm a real believer in "one step at a time." )
------------------
JPD
Aug 5, 1999, 5:17 PM
Novice (33 posts)
Aug 5, 1999, 5:17 PM
Post #30 of 48
Views: 7585
I already have set up the new server, in fact that's when my NEW problems started but the old one didn't get much further. How do you set up the auth_user field. Is this any field or a special one set up for just this purpose. Finally I want to restate my minimum objective. I would like the user to be able to set up a record. Once set up and with user id and password be able to delete or modify his own record only but could view all records. Once the user is set up he would be validated either manually or if possible with programming. I'm cutting through the frustation and awaiting your thoughts.
Aug 5, 1999, 6:55 PM
Veteran / Moderator (8669 posts)
Aug 5, 1999, 6:55 PM
Post #31 of 48
Views: 7555
If you want records to be associated with the users who created them, you must create a field for the userid. I usually call it "Userid." You set up the field as you would set up any field. You can set the "maxlength" of the field to 12, since DBMan only allows userids that are between 3 and 12 characters in length.
Then you set the $auth_user_field variable to the number of the Userid field. The userid will be automatically added to the record when the record is added.
If you want each user to have only one record, set your $db_key variable to the name[/b] of your Userid field. It would be like
$db_key = 'Userid';
You would also set $db_key_track = 0; because you wouldn't want to increment a counter if you're using the Userid field.
You said:
The way DBMan works is that the user first signs up for a username and password and then adds a record. It may be that you already understand that, but it wasn't clear from what you wrote.
Do you want users to be able to sign up for accounts online or do you want to add user's names yourself through the "Admin" link?
I have written code for several different validation routines. I haven't got a mod made up yet, because there are a number of different options that people might want to use and each requires different coding. But, if you'll tell me what you want, I can give you one of them here on the forum.
Primarily the question comes in with whether you want to send email to the person whose record is either validated or deleted. And if you want to send a "canned" email message to each one or to be able to edit the email message before it goes out.
Take a deep breath. I know it's frustrating, but you'll get there.
------------------
JPD
Then you set the $auth_user_field variable to the number of the Userid field. The userid will be automatically added to the record when the record is added.
If you want each user to have only one record, set your $db_key variable to the name[/b] of your Userid field. It would be like
$db_key = 'Userid';
You would also set $db_key_track = 0; because you wouldn't want to increment a counter if you're using the Userid field.
You said:
Quote:
I would like the user to be able to set up a record. Once set up and with user id and password be able to delete or modify his own record only but could view all records. Once the user is set up he would be validated either manually or if possible with programming.The way DBMan works is that the user first signs up for a username and password and then adds a record. It may be that you already understand that, but it wasn't clear from what you wrote.
Do you want users to be able to sign up for accounts online or do you want to add user's names yourself through the "Admin" link?
I have written code for several different validation routines. I haven't got a mod made up yet, because there are a number of different options that people might want to use and each requires different coding. But, if you'll tell me what you want, I can give you one of them here on the forum.
Primarily the question comes in with whether you want to send email to the person whose record is either validated or deleted. And if you want to send a "canned" email message to each one or to be able to edit the email message before it goes out.
Take a deep breath. I know it's frustrating, but you'll get there.
------------------
JPD
Aug 8, 1999, 9:08 PM
Veteran / Moderator (8669 posts)
Aug 8, 1999, 9:08 PM
Post #36 of 48
Views: 7629
Aug 9, 1999, 7:01 AM
Veteran / Moderator (8669 posts)
Aug 9, 1999, 7:01 AM
Post #38 of 48
Views: 7559
Aug 9, 1999, 8:46 AM
Novice (33 posts)
Aug 9, 1999, 8:46 AM
Post #39 of 48
Views: 7680
Yes I tried searching to no avail. I even created a file and named it stream.key and it didn't seem to have any impact. I'm working on the Omni side of it so maybe they will come up with something. Meanwhile my dbman is working pretty good. It doesn't do exactly what I want but I never could get to utopia so I may settle for this. Please try it and see what you think. http://postmodem.com/dips/shadow/root/dbman/dbmain.htm I hope you have sound to listen to the jazzy music!
Did you check your db.cgi for a stream.key. I got a similar error message for the database tracking mod I installed.
It contains the following insertion string(s): c:\inetpub\wwwroot\coconino\cgi-bin\directory\data\keywords.txt, 8.
I was curious why a particular DBMAN project was running slow compared to other projects, then I realized that I had a bunch of test mods to the index.cgi file. I also analyzed the Applications Event Log file.
Possibly, there is some routine in your db.cgi file that is pointing to stream.key.
Regards,
------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
[This message has been edited by Eliot (edited August 09, 1999).]
[This message has been edited by Eliot (edited August 09, 1999).]
Code:
The description for Event ID ( 4101 ) in Source ( Ci ) could not be found. It contains the following insertion string(s): c:\inetpub\wwwroot\coconino\cgi-bin\directory\data\keywords.txt, 8.
I was curious why a particular DBMAN project was running slow compared to other projects, then I realized that I had a bunch of test mods to the index.cgi file. I also analyzed the Applications Event Log file.
Possibly, there is some routine in your db.cgi file that is pointing to stream.key.
Regards,
------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
[This message has been edited by Eliot (edited August 09, 1999).]
[This message has been edited by Eliot (edited August 09, 1999).]
Aug 9, 1999, 10:35 AM
Novice (33 posts)
Aug 9, 1999, 10:35 AM
Post #41 of 48
Views: 7656
Now that's strange. It does work for me. This is the kind of computer voodoo that drives one crazy. I used to be a help desk guru for mainframes and pc's and I would go out and fix a particular problem and never know what I did to fix it! It just started working after I played with it and rebooted it. etc. I was a programmer too but I never solved programming problems that way. You've got to be too precise as you well know. But I digess . Did you notice that when my page comes up it drops down to the input box. Any clue why it does that? I really don't want it to. By the way I really like this discussion software. Is it a cgi thing too? And available?
leokelly,
Look in the <body> tags of your form sub-routines. You will see onLoad....
This java script command takes people directly to the form on the page. Just delete the onLoad... codes and the page will load to the top of the page.
Regards,
------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Look in the <body> tags of your form sub-routines. You will see onLoad....
This java script command takes people directly to the form on the page. Just delete the onLoad... codes and the page will load to the top of the page.
Regards,
------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Aug 9, 1999, 10:41 AM
Veteran / Moderator (8669 posts)
Aug 9, 1999, 10:41 AM
Post #43 of 48
Views: 7628
May 10, 2000, 1:27 PM
Novice (49 posts)
May 10, 2000, 1:27 PM
Post #44 of 48
Views: 7642
Hi. I apologize for posting here, since the title of this post ins't really what I need help with, but it is the closest match!
I have used the code supplied above by JPD for the "valid expressions" in a date field, altering the end to force a 4 digit year as follows: And I have also successfully forced a \d.\d{2} for #.## format.
My question is this... how woule I go about coding to allow specific number entry in a field .... i.e. 1.25, 1.50, 1.75, etc... so that the only allowable entries are from 0.25 to 24.00 in increments of .25 ??
Anyone have the answer??
Thanks !
keienb
I have used the code supplied above by JPD for the "valid expressions" in a date field, altering the end to force a 4 digit year as follows:
Code:
\d{2}\/\d{2}\/\d{4}My question is this... how woule I go about coding to allow specific number entry in a field .... i.e. 1.25, 1.50, 1.75, etc... so that the only allowable entries are from 0.25 to 24.00 in increments of .25 ??
Anyone have the answer??
Thanks !
keienb
May 10, 2000, 1:58 PM
Veteran / Moderator (8669 posts)
May 10, 2000, 1:58 PM
Post #45 of 48
Views: 7583
There was a thread a week or two ago where someone wanted to verify that values were within a certain range. (I'm not saying you should have found it. It wouldn't be available through the search of the forum. Just recalling it.)
You would have to add code to sub validate_record to account for this.
If you haven't already made changes to sub validate_record, replace it with the following:
# --------------------------------------------------------
# Verifies that the information passed through the form and stored
# in %in matches a valid record. It checks first to see that if
# we are adding, that a duplicate ID key does not exist. It then
# checks to see that fields specified as not null are indeed not null,
# finally it checks against the reg expression given in the database
# definition.
my ($col, @input_err, $errstr, $err, $line, @lines, @data);
if ($in{'add_record'}) { # don't need to worry about duplicate key if modifying
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_; chomp ($line);
@data = &split_decode($line);
if ($data[$db_key_pos] eq $in{$db_key}) {
return "duplicate key error";
}
}
close DB;
}
foreach $col (@db_cols) {
if ($in{$col} =~ /^\s*$/) { # entry is null or only whitespace
($db_not_null{$col}) and # entry is not allowed to be null.
push(@input_err, "$col (Can not be left blank)"); # so let's add it as an error
}
else { # else entry is not null.
($db_valid_types{$col} && !($in{$col} =~ /$db_valid_types{$col}/)) and
push(@input_err, "$col (Invalid format)"); # but has failed validation.
(length($in{$col}) > $db_lengths{$col}) and
push (@input_err, "$col (Too long. Max length: $db_lengths{$col})");
if ($db_sort{$col} eq "date") {
push (@input_err, "$col (Invalid date format)") unless &date_to_unix($in{$col});
}
if ($col='FieldName') {
if (($in{$col} < .25) or ($in{$col} > 24)) {
push(@input_err,"$col (not within range)");
}
unless ($in{$col}*100/25 == int($in{$col}*100/25)) {
push(@input_err,"$col (incorrect value)");
}
}
}
}
if ($#input_err+1 > 0) { # since there are errors, let's build
foreach $err (@input_err) { # a string listing the errors
$errstr .= "<li>$err"; # and return it.
}
return "<ul>$errstr</ul>";
}
else {
return "ok"; # no errors, return ok.
}
}
Notice that you will need to change FieldName to match the name of your field.
The best way to copy the code is to click the "Edit" icon on this message and copy it from there. This will allow you to keep the formatting I put into it.
If you have already made changes to sub validate_record for some other reason and can't figure out what changes you need to make, post your subroutine here and I'll show you where to put the new code.
------------------
JPD
You would have to add code to sub validate_record to account for this.
If you haven't already made changes to sub validate_record, replace it with the following:
Code:
sub validate_record { # --------------------------------------------------------
# Verifies that the information passed through the form and stored
# in %in matches a valid record. It checks first to see that if
# we are adding, that a duplicate ID key does not exist. It then
# checks to see that fields specified as not null are indeed not null,
# finally it checks against the reg expression given in the database
# definition.
my ($col, @input_err, $errstr, $err, $line, @lines, @data);
if ($in{'add_record'}) { # don't need to worry about duplicate key if modifying
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_; chomp ($line);
@data = &split_decode($line);
if ($data[$db_key_pos] eq $in{$db_key}) {
return "duplicate key error";
}
}
close DB;
}
foreach $col (@db_cols) {
if ($in{$col} =~ /^\s*$/) { # entry is null or only whitespace
($db_not_null{$col}) and # entry is not allowed to be null.
push(@input_err, "$col (Can not be left blank)"); # so let's add it as an error
}
else { # else entry is not null.
($db_valid_types{$col} && !($in{$col} =~ /$db_valid_types{$col}/)) and
push(@input_err, "$col (Invalid format)"); # but has failed validation.
(length($in{$col}) > $db_lengths{$col}) and
push (@input_err, "$col (Too long. Max length: $db_lengths{$col})");
if ($db_sort{$col} eq "date") {
push (@input_err, "$col (Invalid date format)") unless &date_to_unix($in{$col});
}
if ($col='FieldName') {
if (($in{$col} < .25) or ($in{$col} > 24)) {
push(@input_err,"$col (not within range)");
}
unless ($in{$col}*100/25 == int($in{$col}*100/25)) {
push(@input_err,"$col (incorrect value)");
}
}
}
}
if ($#input_err+1 > 0) { # since there are errors, let's build
foreach $err (@input_err) { # a string listing the errors
$errstr .= "<li>$err"; # and return it.
}
return "<ul>$errstr</ul>";
}
else {
return "ok"; # no errors, return ok.
}
}
Notice that you will need to change FieldName to match the name of your field.
The best way to copy the code is to click the "Edit" icon on this message and copy it from there. This will allow you to keep the formatting I put into it.
If you have already made changes to sub validate_record for some other reason and can't figure out what changes you need to make, post your subroutine here and I'll show you where to put the new code.
------------------
JPD
May 10, 2000, 2:33 PM
Novice (49 posts)
May 10, 2000, 2:33 PM
Post #46 of 48
Views: 7632
JPD:
WOW! ... and I thought it was gonna be as easy as adding the 'valid_expr' that I mentioned in my post
I had to tweak a bit, cuz there were already several changed to my sub validate_record, but I did get it working ... like a charm - but what does one expect from you?? You're always so quick to lend a hand!
One question, tho ... when I attempt to enter an INVALID expression to test the validation, it gives me the error message (out of range) SIX times instead of just once .... ???
Thanks again!
keienb
WOW! ... and I thought it was gonna be as easy as adding the 'valid_expr' that I mentioned in my post
I had to tweak a bit, cuz there were already several changed to my sub validate_record, but I did get it working ... like a charm - but what does one expect from you?? You're always so quick to lend a hand!
One question, tho ... when I attempt to enter an INVALID expression to test the validation, it gives me the error message (out of range) SIX times instead of just once .... ???
Thanks again!
keienb
May 11, 2000, 12:33 AM
Veteran / Moderator (8669 posts)
May 11, 2000, 12:33 AM
Post #47 of 48
Views: 7612
It would be nice if there was a regular expression to do what you want, but, alas, no such luck.
I see what the problem is. I made a bonehead error.
should be
That should fix the problem.
------------------
JPD
I see what the problem is. I made a bonehead error.
Code:
if ($col='FieldName') {should be
Code:
if ($col eq 'FieldName') {That should fix the problem.
------------------
JPD