Solved

Network Programming Concept

Posted on 2003-12-01
7
254 Views
Last Modified: 2010-04-17
I am to design a program with master-child relationship. The batch (master) part consist of info on the batch and transactions (child) part consist of info on the transactions.
The database is located in a server and this program is meant for a network environment.

My problem is when a user create a new batch, do I create a temporary local database in the user PC during this session or do I use the database in the server for the session. Or do I transfer the whole database into the local hard disk.  Can someone advise me on which concept to use. I am new to this type of programming. Thank-you
0
Comment
Question by:tsluu
  • 3
7 Comments
 

Expert Comment

by:amitm
ID: 9856258
This type of programming is called Client-Server programming.
Client can access (transactions) the database remotely. There is no need to copy the entire database or a part of it on client side. This will work without any problems until you consider time constraints in some cases. If you want to access (only read) some portion of database frequently, then you can cache that part in local machine, but this will be complicated if you are changing that part of database from other client at the same time. In the beginning, you can leave that optimization.
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 100 total points
ID: 9856617
hmmm that depends on the number of client users and the database you are using. I assume you are using VB and if you are using components then I can suggest you use DCOM to achieve this so that the clients call the server's components and do the database interaction. DCOM in VB is very easy if you have knowledge of COM in vb instead of using
createobject("prj.class")
 u use
createobject("prj.class", "servername")

remember the components need to be present at both places.

now comming to non component programming.
you can fire queries directly to the database with transactions using ODBC if you are using access the you can use jet by sharing the file on the network too but better would be to upgrade to MSDE which prevents someone from deleting the file accidently (I faced this problem)

if u need more info feel free to write
0
 

Author Comment

by:tsluu
ID: 9863315
I am using VB and Access *.mdb as my database in the server. What I have done is:

* For new master record
a new record is added in the Master table,
new transactions are added in the Details table, referencing to the Master table,
if user decides to exit without saving then I delete all transactions with reference to the Master record

* For existing master record
user edits transaction the record directly

bhagyesht, I dont know whether this is a practical way to do it. Kindly advise. Thanks.
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9864048
if you are expecting under 20 simultenous clients its fine. but never the less I would suggest have a look at MSDE besides offering scalability it offers you an option to migrate to MSSQL server at a later date without any significant code change.
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9864053
just ensure that all the clients are generating different primary key for the master table
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now