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";
 pDatabase.Open(NULL,0,0,strpath);
 cSql.Format(_T("DELETE FROM User WHERE Name='%s'"),str);
 pDatabase.Execute(cSql);


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

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