Sunday, February 12, 2012

Cant import an Access table due to null values.

Question: Why would I not be able to import an Access 97 table in
which some records have null values in fields that allow null values?

Wouldn't the table's design be imported first, bringing the columns'
"allow nulls" attribute with it?

I'm dealing with both text and numeric columns. Not all columns
containing nulls cause an error.

Thanks,

Bob C."Bob C." <bcanavan@.bmghomes.com> wrote in message
news:2e5623fb.0402201301.4098061b@.posting.google.c om...
> Question: Why would I not be able to import an Access 97 table in
> which some records have null values in fields that allow null values?
> Wouldn't the table's design be imported first, bringing the columns'
> "allow nulls" attribute with it?
> I'm dealing with both text and numeric columns. Not all columns
> containing nulls cause an error.
> Thanks,
> Bob C.

It's hard to say (at least for me) what the issue may be without more
information. In particular, how are you importing the table, and what is the
exact error message you see? Also, which version of SQL Server are you using
as the target for the import? If you're using the upsizing wizard, you may
want to post this in an Access newsgroup as well, as it's an Access tool,
not an MSSQL one.

Simon|||Thanks, Simon.

I'm using DTS to import to SQL2k. Sorry for not posting that
information.

It turns out that only two of the columns in my Access table were
affected, and they both disallowed nulls. This attribute was one I
set after the Access database had been in production awhile, and the
db manager asked that nulls for those columns be blocked. I think
what happened was that nulls already in those columns were
grandfathered(strange that I wasn't warned when I set the "allow
nulls" attribute to false), and the new table structure in SQL2k
correctly carried over the attribute - tripping over the grandfathered
nulls when I tried to import them.

Thanks for your help.

Bob C.

No comments:

Post a Comment