Richard Korts
asked on
Delete Query
What is wrong with this delete query?
DELETE Orders where OrderNo = 16788
OrderNo is AutoNumber. Table structure in attached jpg.
I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Orders-table.jpg
DELETE Orders where OrderNo = 16788
OrderNo is AutoNumber. Table structure in attached jpg.
I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Orders-table.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try DELETE * FROM Orders WHERE OrderNo = 16788
A point of note adding the next three fields to the primary key has not helped as you cannot have two OrderNos with the same number. It doesn't add anything. The OrderNo alone who do the same. You may want to add the other fields as n Index of some sort.
Kelvin
A point of note adding the next three fields to the primary key has not helped as you cannot have two OrderNos with the same number. It doesn't add anything. The OrderNo alone who do the same. You may want to add the other fields as n Index of some sort.
Kelvin
ASKER
Why is * needed in this case? It is not normally.
it is needed, because you connect via a "Microsoft OLE DB Provider for ODBC Drivers"
So, remove those other three fields as part of the Primary Key.
mx