Access 2002/SQL 2000 Constraints

Access 2002/SQL 2000 Constraints

Post by Gene » Sun, 16 Jun 2002 08:47:25



I've worked with Access for a number of years.  I just
purchased 2002 Developer and am attempting to transfer a
large database to SQL 2000 as an Access project.

There's a knowlegebase article (ACC2002) which addresses a
problem with table constraints.  I appear to be having
much more of a problem then it describes.

In the table I'm working with, I have a number of fields
set for Not Null and I've written a Constraint to not
allow empty strings in the same fields.

In my form when I enter a new record and do not enter the
required information, the record will not move off of the
current record and will not give me a message notifying of
the constraint problem.

Also, when you close the form the record is not saved and
no message is given that it is not saving.  I know that
Access.mdb tables do the same thing when you mark a field
as "required".

Any help would be appreciated if anyone else has had this
problem and has developed a work around.

 
 
 

Access 2002/SQL 2000 Constraints

Post by Mary Chipma » Thu, 20 Jun 2002 05:36:53


If you're not going to allow nulls or empty strings, then the best
solution is to specify a default value. As far as duplicating the
behavior of not being notified--I don't see that. I did a repro using
the Categories table in Northwind as the basis of an Autoform, and
tried to create a new record. when I moved off of the CategoryName
(required), I got an error message right away.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446


>I've worked with Access for a number of years.  I just
>purchased 2002 Developer and am attempting to transfer a
>large database to SQL 2000 as an Access project.

>There's a knowlegebase article (ACC2002) which addresses a
>problem with table constraints.  I appear to be having
>much more of a problem then it describes.

>In the table I'm working with, I have a number of fields
>set for Not Null and I've written a Constraint to not
>allow empty strings in the same fields.

>In my form when I enter a new record and do not enter the
>required information, the record will not move off of the
>current record and will not give me a message notifying of
>the constraint problem.

>Also, when you close the form the record is not saved and
>no message is given that it is not saving.  I know that
>Access.mdb tables do the same thing when you mark a field
>as "required".

>Any help would be appreciated if anyone else has had this
>problem and has developed a work around.