Dear Jim,
i searched google and i found a similar problem someone has had.
i opened my mdb file and i set the id field(autonumber type) as primary key.
There was another field as primary key (access has set it as primary key by
default) and i deleted it.
Now add and delete operations do work but the update operation is still
causing problems.
i get the message invalid.Try
http://www.byzantine-mosaics.gr/test/Database1_interface/news/editor/database_editor.aspx
to see that now add and delete do work.
Only update causes problems.Why?
Thanks in advance
Thanasis
When I tried to add a record, I got
The operation failed. If this continues,
please contact your server administrator.
but I didn't get Invalid.
The Invalid thing has to be a local issue on your computer. It's hard
to imagine what could disrupt the regular expression evaluator,
though.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
Dear Jim thanks again for your time,
i tried the page you provided.
When i entered 6/28/2004 in the date text box i got the message "you
entered
6/28/2004"
When i entered garbage i got the message "invalid".
i understood the validation expression and i agree that it shoudn't have
caused problems.
I send you a link to try the database editor.
In the first case (asp format) everything works ok.Try the link below
where
you can update,add or delete records:
http://www.byzantine-mosaics.gr/test/Database1_interface/news1/editor/database_editor.asp
You might notice that the date field is displayed as dd/mm/yyyy
In the second case (asp.net format) you should get the ERROR MESSAGE
"invalid".Try the link below where you can update,add or delete records:
http://www.byzantine-mosaics.gr/test/Database1_interface/news/editor/database_editor.aspx
You might notice that the date field is displayed as dd/mm/yyyy
hh:mm:ss.
Why it is displayed differently from the first case?
My best wishes
thanasis
=======================================================================
Ah, right. Just our of curiosity, try this page:
http://www.interlacken.com/examples/validator.aspx
Enter 6/28/2004 in the text box, then click Submit and
tell me what message appears.
Then enter garbage in the text box, click Submit, and tell me what
message appears.
FYI, the component that seems to be causing the problem is an ASP.NET
Regular Expression Validator. In the long and ugly attribute:
ValidationExpression="(0?[0-9]|1[0-2])[-/]([0-2]?[0-9]|30|31)([-/][0-9]{1,4}
)?(
)*((0?[1-9]|1[0-2]):[0-5][0-9]
[0-5][0-9])?(
)*[aApP][mM]|([0-1]?[0-9]|2[0-3]):[0-5][0-9]
[0-5][0-9])?)?"
(0?[0-9]|1[0-2]) means "a zero or nothing followed
by a character 0 through 9"
or "a 1 followed by a character 0 through 9"
[-/] means a hyphen or a slash
([0-2]?[0-9]|30|31) means "a 0, 1, or 2 followed
by a character 0 through 9"
or or "30" or "31"
[-/] means a hyphen or a slash
([0-9]{1,4}) means "1 to 4 instances of the characters 0 through 9"
? means all the preceding is optional
The rest of the expression allows a space, then defines two optional
time formats, then uses a question make to make the time optional,
then uses another a question mark to make the entire expression
optional.
So, I really don't see where culture settings would make a difference.
It seems that 0-9 would be 0-9, a hyphen would be a hyphen, and a
slash would be a slash, regardless of culture.
If you want, though, you could try changing your culture setting in IE
and in Control Panel to English
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
Dear Jim,
i'd like also to inform you that the database editor works correcty
when
it
displays pages as asp and not as asp.net.
I was just wondering why it doesn't work in the later case (asp.net
format)
Wishes
Thanasis
========================================================================
I'm starting to run out of ideas, especially because the code
works
for
me.
You're entering these dates as month/day/year or month-day-year,
right?
Formats like day.month.year won't work.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
Dear Jim thanks for your help,
i'm still facing problem.
I can neither update nor add a new record.
I am always getting the same error message(invalid) besides the
date
text
box.
I 've been trying to enter various dates but i'm getting the
same
message.
What do you advise me to do?
Wishes
Thanasis
I pasted your code into a simple Web page and it ran OK here.
For
example, the dates:
2/2/2
6/24/04
6/26/2004
were all valid. The date 24-jun-2004, however, was invalid.
The following code is all on oneline, right?
ValidationExpression="(0?[0-9]|1[0-2])[-/]([0-2]?[0-9]|30|31)([-/][0-9]{1,4}
)?( )*((0?[1-9]|1[0-2]):[0-5][0-9]
[0-5][0-9])?(
)*[aApP][mM]|([0-1]?[0-9]|
2[0-3]):[0-5][0-9]
[0-5][0-9])?)?"
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
Hi Jim and thanks again for your response,
my answers to your questions are:
1)i browse my page using
http://... I have IIS 5.1 installed
on
WINXP
PRO.
2)I have .NET Framework installed.I can see aspx pages and
when
i go
to
control panel->add/remove programs i see in the list of
programs
the
.NET
framework.
3)The INVALID message doesn't go away even if i provide a
valid
date.
I can neither update nor add a new record.
I would like also to point out that after trying the wizard
on
another
table
of my database - which doesn't contain a date field- it
works
perfectly.
In
my opinion it is the date field that causes the problem.
My best regards
Thanasis
Howdy.
Are you browsing the page from a Microsoft Web server,
using an http:// URL?
Does the Web server have the .NET Framework installed?
When you browse the page and enter a valid date, doesn't
the INVALID message go away?
If those questions doesn't help you figure out the
problem, please post again to this thread and provide the
URL of the problem page.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
-----Original Message-----
Hello to everyone,
i am building a database application with Fp2003.
My access database consists of one table which contains a
date field.
When i create the database editor (ASP net), besides to
the date text field
there is a red word "INVALID".
Moreoner i can't neither update a record nor add a new
one.
Inside the code of my page i see something like that:
<asp:RegularExpressionValidator
ControlToValidate="txtimerominia"
ErrorMessage="Invalid!"
ValidationExpression="(0?[0-9]|1[0-2])[-/]([0-2]?[0-9]
|30|31)([-/][0-9]{1,4}
)?( )*((0?[1-9]|1[0-2]):[0-5][0-9]
[0-5][0-9])?( )*[aApP]
[mM]|([0-1]?[0-9]|
2[0-3]):[0-5][0-9]
[0-5][0-9])?)?" Display=Dynamic
Runat="server"/>
Any help would be highly appreciated
thanasis
.