Update Query

Diksha1310

Registered User.
Local time
Yesterday, 16:42
Joined
Sep 21, 2011
Messages
12
I'm computerizing a bookshop. For my purchase form, i need the following tables: PurchaseID, DatePurchased, QuantityInStock, QuantityPurchased, TotalCost and InvoiceNum.
But,...since they are not found on the same table, i did a query,..but the query does not accept any additions,deletions,etc..its read only.. ! So its difficult to make a form based on it as data cannot be entered or even modified!
Can someone help...! I'm stuck :confused:
 
Can it be because it is one to many relationship!! The other reasons don't fit,..i did another query previously for my book form,..it was NOT read only though! i can;t understand why only this particular one.
 
SELECT tblPurchase.PurchaseID, tblPurchase.DatePurchased, tblStock.QuantityInStock, tblPurchase.QuantityPurchased, tblPurchase.[TotalCost($)], tblPurchase.InvoiceNumber
FROM (tblSupplier INNER JOIN ((tblBook INNER JOIN tblStock ON tblBook.[BookID] = tblStock.[BookID]) INNER JOIN [tblSupplier-Book] ON tblBook.[BookID] = [tblSupplier-Book].[BookID]) ON tblSupplier.[SupplierID] = [tblSupplier-Book].[SupplierID]) INNER JOIN tblPurchase ON tblSupplier.[SupplierID] = tblPurchase.[SupplierID];
 
I believe it's your JOINS.... like you guessed in your other post.
 
Can it be because it is one to many relationship!! The other reasons don't fit,..i did another query previously for my book form,..it was NOT read only though! i can;t understand why only this particular one.




You may have overlooked one of the reasons from the list. Based on your SQL Code, the way that your Tables are JOINed could be contributing to the problem. I would look into the folowing as an possible potential issue:
  • The fields in a JOIN are not indexed correctly: there is no primary key or unique index on the JOINed fields.
UPDATE: Once again I get interrupted at work during an attempt to reply and wind up posting nearly the same thing as someone else. At least I am in good company.
RESULT? Looking at the JOIN Statements (Order and Index) seems to be the right place to start.
 
Last edited:
Yeah, but all my tables have a unique primary key..
is there a soln?
 
You may have indexes and PKs but the JOINS would not permit an update. You need to break it down into two parts.
 

Users who are viewing this thread

Back
Top Bottom