G
Guest
I designed an append query in Access to add records to a SQL table. The PK in
the SQL table is an identity column. There are no null values in any column
or record. I get an error message "you tried to assign a null value to a
variable that is not variant type data". I presume this is because the
identity column is not included in my statement. I expected it to
automatically add and increment the identity column (as happens in Access).
How should I handle this? Here is my SQL statement:
INSERT INTO ApptIDConnect ( DB1, AppointmentID1, DB2, AppointmentID2 )
SELECT c.DB1, c.AppointmentID1, c.DB2, c.AppointmentID2
FROM ApptIDConnectLocal c;
Thanks once again!!
the SQL table is an identity column. There are no null values in any column
or record. I get an error message "you tried to assign a null value to a
variable that is not variant type data". I presume this is because the
identity column is not included in my statement. I expected it to
automatically add and increment the identity column (as happens in Access).
How should I handle this? Here is my SQL statement:
INSERT INTO ApptIDConnect ( DB1, AppointmentID1, DB2, AppointmentID2 )
SELECT c.DB1, c.AppointmentID1, c.DB2, c.AppointmentID2
FROM ApptIDConnectLocal c;
Thanks once again!!