B
BK
I have an Access 2002 adp file which is linked to SQL Server 2000. I
recently found that a primary key field was blank. This shocked me as I
didn't understand how SQL Server would allow a PK to be Null. Well what
I found out was that it was a zero-length string. From googling around
it seems like if you enter something in the text box and then erase it,
instead of putting in a null value it puts in a zero length string. I
verified this by using query analyzer. Instead of putting <null> in
that field it was just blank. Well basically this cannot happen. I do
not want to allow zero-length strings in this field. But I cannot find
such an option in the adp like I might be able to find in a regular mdb
database. How can I not allow these zero length strings? I would
really not like to use a hack like entering a bogus record with a zero
length string or even a validation rule on the form to not allow "" I
would prefer it to be controlled by SQL Server. Do I have to go about
it another way other than a nice little check box that says "Do Not
Allow Zero-Length Strings"?
TIA,
Bill
recently found that a primary key field was blank. This shocked me as I
didn't understand how SQL Server would allow a PK to be Null. Well what
I found out was that it was a zero-length string. From googling around
it seems like if you enter something in the text box and then erase it,
instead of putting in a null value it puts in a zero length string. I
verified this by using query analyzer. Instead of putting <null> in
that field it was just blank. Well basically this cannot happen. I do
not want to allow zero-length strings in this field. But I cannot find
such an option in the adp like I might be able to find in a regular mdb
database. How can I not allow these zero length strings? I would
really not like to use a hack like entering a bogus record with a zero
length string or even a validation rule on the form to not allow "" I
would prefer it to be controlled by SQL Server. Do I have to go about
it another way other than a nice little check box that says "Do Not
Allow Zero-Length Strings"?
TIA,
Bill