Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple users in .DLL? 1

Status
Not open for further replies.

TheKing

Programmer
Joined
Feb 25, 2002
Messages
151
Location
US
I am new to .DLL programming.

I am making a .dll VB program that is being acessed by a web page, also this .dll uses multiple tables and hundreds of fields in an Oracle 9i database and I was wondering how the database would be affected when multiple users are using the same data.

I am thinking that I would like to make a "temp" Access or Oracle database linked to the class module that is open. Can I 'make' local tables in vb and use them for my class module that is open and then blow them away when the class closes?

For example: user 243 wants to run the .dll so the .dll makes a database (copy) filles this database with the info it needs and starts it work, while at the same time user 132 wants to run the dll and the next class module that is created also creats a database and fills it witht he info it needs. I have heard this would be relativly easy or at least easier in vb.NET but I am in VB 6.0 so is this a solution?

TheKing
[pc3]
 
this .dll uses multiple tables and hundreds of fields in an Oracle 9i database and I was wondering how the database would be affected when multiple users are using the same data.

Databases are designed to cope with hundreds of users connecting all at once, so I wouldn't worry - let the database handle that. That being said, MS-Access *doesn't* handle multiple users that well -- for a small application, I would use MSDE instead (free download from Microsoft to Visual Studio users)

I am thinking that I would like to make a "temp" Access or Oracle database linked to the class module that is open. Can I 'make' local tables in vb and use them for my class module that is open and then blow them away when the class closes?

Yes, you can make temp tables that belong to a single database connection. The better databases support this. But you really shouldn't have to, unless there was data that is tied to the user, and not to the application. Try and avoid doing this - it consumes a lot of resources on the database.

I would strongly suggest you read up on database locking.

When you've got multiple users accessing the database at the same time, it's possible for User A to be viewing a list of, say, customers, while at the same time User B is updating one of those customers. Locking determines how this is handled. The basic options are:
1) User A sees "in doubt" data - rows that other users have not yet completed writing to the database
2) User A sees only completed data - rows that are "in doubt" are not returned to them
3) User A doesn't see any data, because User B has a lock on one or more of the rows that User A wants to see.

Chip H.
 
Thanks for the feedback, I will see what I comeup with.


TheKing
[pc3]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top