|
-
May 6th, 2013, 04:06 PM
#1
Thread Starter
New Member
Referencing a change in value of a database (VB2008)
Hello,
I am seeking advice on a small app I am working on. It is a small inventory management program in which I have embedded an Access
database into. What I am wondering is, are there any ways to reference a change in a record of a database. For example, if the inventory of an item changes from 2 to 0, then I want to re-order more. But, I am not sure if it is possible to reference this change in value.
I know that you can literally drag the fields into the form and it will create text boxes - but I wanted to leave it embedded as a database and reference it that way.
If you know of any ways to do this, that would be great!
Anthony
-
May 6th, 2013, 05:19 PM
#2
Re: Referencing a change in value of a database (VB2008)
If you were using SQL Server (express version is free) I would suggest you look at creating a trigger. I'm not sure if access supports triggers.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94688
That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma
Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney
-
May 6th, 2013, 06:08 PM
#3
Re: Referencing a change in value of a database (VB2008)
I don't think Access allows anything like that. With that off the table, your only option may be to poll. If that is all you can do, then set up a BackGroundWorker component that periodically queries the DB, does what it needs with the result, then goes to sleep for some length of time. Figuring out the length of time for it to sleep would be pretty much a matter of feel. Too often and you are wasting CPU time. Too infrequently and you'll be missing out. You can use the ReportProgress event to act like the trigger you are wanting. It's not a great solution, but it may be all you can do in Access.
My usual boring signature: Nothing
 
-
May 6th, 2013, 07:15 PM
#4
Thread Starter
New Member
Re: Referencing a change in value of a database (VB2008)
Thank you, I may consider migrating over to sql express then.
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
|