Hello
I want to delete a record in a table. The sql statement has Joins. I
have the recordset open as
(on the air code, might have syntax error here)
Set DnTemp = New ADODB.Recordset
DnTemp.CursorLocation = asUseClient
DnTemp.LockType = adOpenDynamic
DnTemp.Property("Unique Table") = table_Name
But when I issue a statement, DNtemp.Delete, it gives an error message
something to the effect of, "Insufficient Key Column Information
etc.."
Could someone tell me as to how do I delete records when there are Sql
Statements with Joins involved.
Thanks
Sue..
Val Mazur - 30 Aug 2003 19:51 GMT
Hi Sue,
First of all check if you have primary key fields. Second if you will try to
delete record which related to number of records in another table, then your
SQL statement should fail. What I would suggest to do in that case is to use
explicit DELETE SQL statement to delete all related records first and then
delete that *parent* record

Signature
Val Mazur
Microsoft MVP
Check Virus Alert, stay updated
http://www.microsoft.com/security/incident/blast.asp
> Hello
>
[quoted text clipped - 16 lines]
> Thanks
> Sue..