|
-
May 1st, 2004, 09:59 AM
#1
Deleting a record
This query works fine...
SELECT exp.ID AS [REC_ID], exp.date AS [Date], cat.description AS Category, est.name AS Establishment, Choose(exp.payment+1,'Cash','Credit Card','Check') AS [Payment Mode],
Choose(exp.payment+1,crd.company,'N/A','N/A') AS [Credit Card], exp.amount AS Amount
FROM tblCreditCards AS crd RIGHT JOIN (tblCategories AS cat RIGHT JOIN (tblEstablishments AS est RIGHT JOIN tblExpenses AS exp ON est.id=exp.establishment) ON cat.id=exp.category) ON crd.id=exp.credit_card
ORDER BY exp.date;
...but why can't I delete a record from an ado recordset?
is it because of the RIGHT JOIN? or how the tables where arranged in the JOIN statement?
by the way...this is the error...
Run-time error: '-2147467259 (80004005)'
Insufficient key column information for updating or refreshing.
Thanks a lot!
-
May 2nd, 2004, 05:44 AM
#2
If your SELECT works fine and the problem is with your DELETE, why post the code for your SELECT?
Perhaps if you share the code that is causing prblems it might be easier to help you with your problem.
If kids were left to their own devices, would they ever come up with a thing like war?......The Wheel / Todd Rundgren
Do canibals not eat clowns because they taste funny? 
-
May 2nd, 2004, 11:47 AM
#3
DELETE FROM WHERE .. delete the record through SQL command..
greetings UNI
-
May 2nd, 2004, 12:10 PM
#4
I posted the SELECT query because when I delete a record from MS Access table browser, I don't encounter errors...only on VB when I use recordset.Delete.
-
May 2nd, 2004, 12:35 PM
#5
I tried the DELETE FROM WHERE and it worked!
But howcome the recordset.delete doesn't work?
-
May 2nd, 2004, 05:48 PM
#6
Don't really know because I never used recordset.delete .. SQL ist a wonderful language and it is much more portable. if using ado you can just change the connection string and you can use a SQL server instead of the mdb database. or mysql etc.. so DELET FROM is always a better choise than using these built in functions.
greetings UNI
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|