|
-
Aug 18th, 2006, 06:49 AM
#1
Thread Starter
Fanatic Member
Database question
I have three columns product1 and prodcut2 and amount. i want that in amount columns the sum of pro1 and pro2 should add. should i slect query in mdb database 2000.
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
-
Aug 18th, 2006, 06:58 AM
#2
Re: Database question
CONNECT the database via vb and u can update all the record of the amout with the sum of both the field....
-
Aug 18th, 2006, 07:11 AM
#3
Re: Database question
 Originally Posted by vivek_master146
I have three columns product1 and prodcut2 and amount. i want that in amount columns the sum of pro1 and pro2 should add. should i slect query in mdb database 2000.
Why?
Storing calculated answers is a waste of database space. You don't need the amount field if the contents that would be stored in it is ALWAYS the sum of the other two fields.
When you retrieve data on product1 one and product2 two, programmtically do the calculations then, on the fly, and do whatever you need with the result.
-
Aug 18th, 2006, 07:17 AM
#4
Re: Database question
@ vivek i think that hack is correct
-
Aug 18th, 2006, 07:26 AM
#5
Thread Starter
Fanatic Member
Re: Database question
I know that i can do it by getting the values. but is there a way to do that.
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
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
|