Hottwire
12-12-2009, 09:12 AM
Hi all
I've been set a project to build a shares simulation program
the 2 problems i am having while making this program is
1) taking data from a database storing it in a array and manipulating/changing it then putting it back into a array
2)Doing a login feature that checks a user and their permissions from a database to allow them to access certain features of my program
Any help greatly appreciated
Thanks
Hottwire
georgedwilkinson
12-12-2009, 10:43 AM
No need to put the data into an array. An ADO or DAO record set is essentially an array and the data can be directly manipulated more easily within the record set object and immediately be saved to the database.
The login/security feature is a little more complex but has been done dozens of times. Use the search feature here to see ways other people have done it.
Hottwire
12-12-2009, 11:03 AM
If that is the case would it be possible to see an example of how I would go about this ?
Thanks in advance
hottwire
georgedwilkinson
12-12-2009, 11:19 AM
Ok, here's a link to one of many hundreds of articles on how to iterate a record set with ADO: http://www.allenbrowne.com/func-ADO.html#AdoRecordsetExample
(http://www.allenbrowne.com/func-ADO.html#AdoRecordsetExample)
I would consider it very unusual for you to be checking an Access forum for how to manipulate data this way and not already understand the concept. What exactly are you trying to do? Is this an assignment?
Hottwire
12-12-2009, 11:49 AM
Yes this is an assignment thanks for the support :)
georgedwilkinson
12-12-2009, 11:54 AM
You should probably state that up front. What you're saying you want to do makes little sense otherwise since there are so many other methods of achieving the same goal.
Hottwire
12-12-2009, 12:04 PM
Sorry that I didn' make it very clear hopefully will get my code working else I'll be back :)
georgedwilkinson
12-12-2009, 12:32 PM
No problem. Just be honest...tell us you don't know what you're doing and why. We'll at least point you in the right direction.
Hottwire
12-13-2009, 06:03 AM
How do i add ado to my visual basic project as using the example code shown above bought lots of errors up on my project.
georgedwilkinson
12-13-2009, 11:49 AM
You need to add a reference to the ADO library. In older versions of VB it was a menu item...not sure in 2008. I'm sure you can find it in the help file (look for information about adding a reference to an external library to your project).
Hottwire
12-13-2009, 11:55 AM
Cheers for all the help so far I will be online and let you know if I cannot add the reference to my vb