Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / August 2003



Tip: Looking for answers? Try searching our database.

Unique Table property not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sue - 30 Aug 2003 14:25 GMT
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..
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.