Hi all, i have a problem.
In my access-application i am trying to insert a record in a linked table with resides in a sqlserver 2000 database. However, the primary key in that table is an INT with identity. I would expect that sqlserver automatically determines the next unique primary-key value (increment = 1) but it seems that it doesn't. I get a primary-key violation. Is there a way to insert a record from access in sqlserver when the table has a autonumberfield as a primary-key.
I use the next statement (of course, i don't specify the primary-key value).
sqlstring = "INSERT INTO dbo_tblSwitchVerzoeken (ZakenPartner, EAN, Product, LeverancierID, Invoerder) VALUES (" & sZakenpartnernummer & "," & sEancode & ", '" & Left(sProdukt, 1) & "'," & sLeverancier & "," & sIngedienddoor & ")"
DoCmd.RunSQL sqlstring
Thans for any suggestions.
Mark