P
Pete Davis
I have the following query, the ... represents a bunch of fields:
INSERT INTO PropertyDetails ( PropertyTypeID, ListingAgent, Address, City,
....)
SELECT [PropertyDetails].[PropertyTypeID], [PropertyDetails].[ListingAgent],
[PropertyDetails].[Address], [PropertyDetails].[City], ...
FROM PropertyDetails WHERE PropertyDetailsID=1
Now, PropertyDetailsID is an autonumber field, so it's excluded from the
field list (and it's the only field excluded). I also have some memo fields,
but I'm not sure if that matters.
When I try to execute this from a query window, I get:
Microsoft Access set 0 field(s) to Null due to a type conversion failure,
and it didn't add 1 record(s) to the table due to key violations, 0
record(s) due to lock violations and 0 record(s) due to validation rule
violations.
So, it's a key violation, it looks like. As a test, I removed all
relationships from the table, so the only key left was the primary key and I
still get the error.
I duplicated this table in MS SQL Server and performed the exact same query
and it works fine.
Any ideas?
Pete
INSERT INTO PropertyDetails ( PropertyTypeID, ListingAgent, Address, City,
....)
SELECT [PropertyDetails].[PropertyTypeID], [PropertyDetails].[ListingAgent],
[PropertyDetails].[Address], [PropertyDetails].[City], ...
FROM PropertyDetails WHERE PropertyDetailsID=1
Now, PropertyDetailsID is an autonumber field, so it's excluded from the
field list (and it's the only field excluded). I also have some memo fields,
but I'm not sure if that matters.
When I try to execute this from a query window, I get:
Microsoft Access set 0 field(s) to Null due to a type conversion failure,
and it didn't add 1 record(s) to the table due to key violations, 0
record(s) due to lock violations and 0 record(s) due to validation rule
violations.
So, it's a key violation, it looks like. As a test, I removed all
relationships from the table, so the only key left was the primary key and I
still get the error.
I duplicated this table in MS SQL Server and performed the exact same query
and it works fine.
Any ideas?
Pete