|
PowerBASIC Forums
![]() Programming
![]() shared database help (Page 1)
|
This topic is 2 pages long: 1 2 |
next newest topic | next oldest topic |
| Author | Topic: shared database help |
|
Jazmin Stevens Member |
hello, i am looking for information about databases, i need to know how they work and what i need to do to allow multiple computers modify a database at the same time keeping the information accurate. i am a complete newbie for this matter. please post an example for power basic for DOS, qbasic or any other basic language. please help. thanx. ------------------ IP: Logged |
|
Shawn Anderson Member |
Jazmin, not every database is the same, they all have advantages and disadvanteges. If you could describe what you're trying to do in a little more detail, you'd probably some good starting ideas. In Basic, the random access database is probably the most used.
This example is very basic but maybe will give you an idea of
------------------ IP: Logged |
|
Jazmin Stevens Member |
hello, thank you very much shawn, but, how can i make a program that can modify the same file from several workstations at the same time? im sorry if i dont describe with detail, but i dont really know what to ask for, i just need a way to make a database program that can add/delete/modify records from several computers at the same time. ------------------ IP: Logged |
|
Brad D Byrne Member |
I know very little about this.. but you need to set up a client/server environment... and "broadcast" to all the neworked computers when the data changes.. so they know to update.. you will probably want an sql or xml server?? I think? commented .. just to try to help start topic discusion ------------------ IP: Logged |
|
Jazmin Stevens Member |
hello brad, how do i do all of that? how do i broadcast? ------------------ IP: Logged |
|
Terry Fritts Member |
quote: There are many databases that can be used with PB. Embedded simply means that the database lives with the program These require special code and libraries and the code varies Database servers on the other hand are programs which run on a These generally are manipulated using ODBC or ADO drives which It is also possible to make any embedded database a server by
quote: That question is too broad to be specific. But generally a
quote: That requirement favors a database server. Which database server If you have to also provide the host resources then you have more Best wishes. IP: Logged |
|
Michael Mattias Member |
> but you need to set up a client/server environment... and "broadcast" to all the neworked computers when the data changes Um, no you don't; you 'can' if you want, but you don't 'need to' do so. For "regular" files the SHARE and LOCK options of the OPEN statment, as well as the LOCK/UNLOCK functions, and the ERR returned when one computer tries to access a file or portion of a file currently in use by another computer provide everything your need. That said, this is not particularly easy to code. If you are using a commercial database, there are options available both the DBMS and through SQL to control access. (Usually not necessary, as most operations on a database are "user-count-agnostic"). MCM IP: Logged |
|
Tom Hanlin Member |
Jazmin, please register with your real name, as you agreed during the registration process. ------------------ IP: Logged |
|
Elias Montoya Member |
Tom she is my girlfriend, she connects from my computer, i helped her registering from my computer, she just came back and we tried to reply and we found out that her privileges where removed. We had a hard time creating a hotmail account for her and Elias ------------------ Do you need a grid In your App?.... Try the Egrid32 Demo: IP: Logged |
|
Tom Hanlin Member |
Please make sure she knows this is a forum for PowerBASIC, not "qbasic or any other basic language". ------------------ IP: Logged |
|
Ian Cairns Member |
Database design in a single-user environment can be tricky enough. Designing a multi-user database from scratch is likely to be an exercise in frustration for a "newbie". You can't let multiple users modify the same record simultaneously. This is why you will need to use file or record locking. I do "roll-your-own" simple databases. I have only done one in a multi-user environment. I used a "master" "lock file" that I use to identify users, files and records that are not permitted to be changed while someone else is changing them. The only file that I "lock" is the master lock file and my program has to be able to "lock" the master file before access to the data is permitted. best wishes, ------------------ IP: Logged |
|
Michael Mattias Member |
>Tom she is my girlfriend, she connects from my computer,i helped her registering from my computer You mean, she did register with her real name, real email address and otherwise followed all the published rules, and the webmaster made a unilateral and not doubt divinely inspired decision she was lying? MCM IP: Logged |
|
Terry Fritts Member |
quote: Doubt you need to worry much about her posting again. IP: Logged |
|
Tom Hanlin Member |
Divinity? No, Michael. Hadn't you heard? "To err is human." It was an honest mistake, since corrected, made on the basis of a ------------------ IP: Logged |
|
Clay Clear Member |
My name probably would have caused a bit of a fuss, too. If I had not bought my first PowerBASIC product directly from PB, Inc. via telephone to their sales dept. with my credit card (my credit card was issued to my real name, which really is "Clay Clear"), Mr. Zale et al probably would have been scandalized when they first saw a posting from "Clay Clear" in these Forums. They have to make their decisions regarding handles SOMEHOW, and such processes are prone to error because of their nature. Fortunately, in my case, they were already aware of my name, weird though it is, so there were no "misunderstandings". ------------------ IP: Logged |
This topic is 2 pages long: 1 2 All times are EasternTime (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1999-2005 PowerBASIC, Inc. All Rights Reserved.