analycer Posted March 1, 2006 Share Posted March 1, 2006 hi all, i'm really new to this stuff.i have created 4 tables, which are-Daily-DailyAccount-Record-Transit's a simple database design, where table Daily keeps the cash in, cash out. DailyAccount keeps the calculated cash in, cash out (from table Record). Record keeps all the transaction made within each day and Trans keeps the transaction ID and it's details.the following SQL query was created in MSACCESS database,UPDATE DailyAccount SET DailyAccount.SoldWeight = (SELECT SUM(Record.Weight) FROM Record, Trans WHERE ((Record.TransID)=(Trans.TransID)) AND ((Trans.TransSum)=True))WHERE ((DailyAccount.Date)=dd); (note that 'dd' is the user input date to update the data)when the query is executed, MSACCESS returns this errorOperation must use an updateable query...have no idea what's wrong with it. i tried changing the SELECT command to number like 999 and the query works fine.appreciate all the help Link to comment Share on other sites More sharing options...
analycer Posted March 1, 2006 Author Share Posted March 1, 2006 UPDATE Daily SET Daily.SoldWeight = SoldWeightWHERE ((Daily.Date)=วันที่) AND (SELECT SUM(Record.Weight) as SoldWeight FROM Record, Trans WHERE ((Record.TransID)=(Trans.TransID)) AND ((Trans.TransSum)=True));but still, the value seems not to be update in the DailyAccount table (it still showing 0). however, when i execute the SELECT query, it returns what it should be.any idea? Link to comment Share on other sites More sharing options...
Pollux Posted March 1, 2006 Share Posted March 1, 2006 Ah, I must have seen that error a hundred times. The problem is generally with the permissions on your database. This page should help you out:http://support.microsoft.com/kb/q175168/ Link to comment Share on other sites More sharing options...
analycer Posted March 5, 2006 Author Share Posted March 5, 2006 hi, thanks for your commenti tried it out but it doesn't seem to work. i configure the database in such way that everybody has full access, but that didn't work.even though, i try setting up an update query, which doesn't update any row. however, the query still shows the same error message.please help me out here, i'm so desperatethanks Link to comment Share on other sites More sharing options...
aspnetguy Posted March 6, 2006 Share Posted March 6, 2006 hi, thanks for your commenti tried it out but it doesn't seem to work. i configure the database in such way that everybody has full access, but that didn't work.even though, i try setting up an update query, which doesn't update any row. however, the query still shows the same error message.please help me out here, i'm so desperatethanks<{POST_SNAPBACK}> Did you right click the db itself and them set the permissions from there??? Your problem is a permissions issue. Link to comment Share on other sites More sharing options...
analycer Posted March 6, 2006 Author Share Posted March 6, 2006 yo, thanks for the fast replyyes, i tried it but it still doesn't seem to work. i add all the users (Guest, Guests, Everyone) and grant Full Control permission to all of them.by the way, this is the link to the file. please help me out here, it will only take you guys a few moment to figure this out the only thing is, i need those update quries to be able to executehttp://s24.yousendit.com/d.aspx?id=2TZLO3H...WZ2FOAJSLEBXK08thanks in advance Link to comment Share on other sites More sharing options...
aspnetguy Posted March 6, 2006 Share Posted March 6, 2006 The above query does not give me an error and executes correctly.How ever this query is giveing the 'updateable query' error. UPDATE Daily SET CashAccount = (SELECT SUM(Record.Price) FROM Record, Trans WHERE ((Record.TransID)=(Trans.TransID)) AND ((Trans.TransCash)=True))- (SELECT SUM(Record.Price) FROM Record, Trans WHERE ((Record.TransID)=(Trans.TransID)) AND ((Trans.TransCash)=False))WHERE ((Daily.Date)=วันที่); All I did was download the db and open it I did not change any permissions.Perhaps you could just download it form the link you provided and it may work. Link to comment Share on other sites More sharing options...
analycer Posted March 8, 2006 Author Share Posted March 8, 2006 nope, still doesn't work...i'd say there's no hope left for me thanks aspnetguy and Pollux for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now