VB Database access

VB Database access

Post by Patrick Moor » Mon, 11 Jan 1999 04:00:00



Hi All,

    I need to pick your knowledge, and I hope you don't mind because I'll
probably be posting in here a lot more in the not to distant future =)

    I've come up with the data structures in access (emm, 4 tables, linked
by ID) and these will be used for storing various bits in the code.. nothing
too heavy)

    But here's the problem, I've never coded anything using files in VB and
I haven't a clue how to write to the database files...)  I need to load the
main file at logon, and look at users table, if the name entered in this
isn't found it'll let you enter a new user, but if it is, it lets you
continue from where you left off.

    Any help here would be most welcome =) Especially if you can understand
what I've just said =)

    thanks in advance...

            Patrick

 
 
 

VB Database access

Post by jdm » Wed, 13 Jan 1999 04:00:00


First, you have to make sure that DAO is checked under your project
references list.  Then, you need to spend some time studying your help
files on how to use DAO.  Namely:

How to open a Database object.

How to use Querydef and Recordset objects.

How to use bound controls and Data controls.

There are two general methods for accessing Access databases with DAO.
One is to slap a Data control on a form, and tie it to a database.
Then slap a bound control on the form and attach it to the Data
control.  For every bound control you use, you either have to use
another Data control, or re-orient the existing data control for the
2nd bound control when you need it.

The other is to use DAO objects in code, creating your recordsets and
populating your controls manually.  It's a bit more work, but it gives
you more flexibility.  Also easier to work with if you've got several
controls on a form that need to be populated from the database.

jdm

 
 
 

1. VB Database access - keeping totals

Can anyone help?  (Is this the right place to ask if anyone can help?)

I want to show a scrolling list of rows from a database, but want to
manipulate some fo the values to include running totals in the rows - i.e.
each row to contain a cell with the total of the corresponding cell above
plus a value from the current row.

Is that possible with a query, or do I have to resort to the recordset and
iterate through it then populate the cells manually, rather than using a
bound grid?

Any suggestions gratefully received!

Thanks.

2. programming a spell checker to suggest words

3. VB Database Access methods

4. US-IL-ORACLE HRMS FUNCTIONAL CONSULTANTS

5. Is VB Database Access Flaky?

6. Looking for database replication software over LANs

7. VB database access on the internet

8. File DSN probs

9. VB database access peculiarity

10. linking one access database to another access database through vb.net code

11. accessing MS access database using VB&CGI

12. Importing an Access 2000 table into another Access 2000 database with VB Code

13. Access a Access database with VB