Click here to Skip to main content
15,943,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CString cSql;
 CString strpath;
 CDaoDatabase pDatabase;
 strpath = "ODBC;DSN=CONTACT;UID=sa;PWD = cademtech";
 cSql.Format(_T("DELETE FROM User WHERE Name='%s'"),str);

When I try to delete some reccords fom the sql server 2005 datbase, I get the above error. Can anyone please help me?
Updated 20-Oct-10 1:54am

1 solution

The delete query contains multiple tables, and the UniqueRecords property is set to No.

1. Open the delete query in Design view.
2. On the View menu, click Properties.
3. Set the UniqueRecords property to Yes.
4. Save the query, and then close it.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900