|
-
Jun 26th, 2010, 09:34 AM
#1
Thread Starter
New Member
Mutilple user access database VB.NET
Hi,
I am a newbie to databases with VB.NET, I can connect a simple Access database to VB using OLEDB and that is about it. However, I am about to embark on a school project which will require me to have a database shared between about 30 people. 1 will be able to write to it and 30 will just be reading data from it.
How do I go about creating this database and then accessing it in VB forms?. I had tried hosting an access database on a host but that just couldn't connect, probably as I had no clue what I was doing. Anyway, How do I go about doing this in a simple way?, alternately, I could think of doing it in ASP, but I am a newbie to that as well XD.
Thankyou
Callum
-
Jun 26th, 2010, 12:03 PM
#2
Re: Mutilple user access database VB.NET
Welcome to VBForums 
From your mention of "hosting", it seems that you are trying to connect to the database over the internet, which is a bad idea for a few reasons (security, speed, and more), especially with a file-based database such as Access (which is bad for multi-user systems anyway, and ridiculously hard over the web for even a single user).
If all of the users will be on the same network, you should have the database somewhere inside the network (perhaps a server, or just one of the PC's), which reduces the problems significantly.
If it does need to be via the internet, a server side solution like ASP.Net is the way to go, as that also reduces the problems significantly.
-
Jun 26th, 2010, 01:25 PM
#3
Thread Starter
New Member
Re: Mutilple user access database VB.NET
Unforunately, all of the pc's will be located in various parts of the country, so a Lan solution isn't possible .
How hard are we talking about in VB connecting computers to a database stored on a host?. What creates the difficulty?
Also, this brings me to the decision of asp.net vs php. Are both easy to connect to MYsql? And can I have one user updating/ adding records to the tables whislt the other 30 users are reading data from the database?
-
Jun 26th, 2010, 01:47 PM
#4
Re: Mutilple user access database VB.NET
 Originally Posted by callumh27
How hard are we talking about in VB connecting computers to a database stored on a host?.
Potentially 10 times as much work... and much more if you use something like Access.
What creates the difficulty?
The slow connection is very significant, because you will naturally send "too much" data back and forth, and it isn't just the actual data either - there is also meta data, lock info, etc. If there were multiple people writing data there would be a high chance of getting locking issues, which would make your app seem like it was hanging (or worse, crash it).
With a server-side application, the database traffic does virtually no travelling, so the speed wont be noticeable - you just send a relatively small amount of data from the application to the client, assuming of course that you don't make it easy for the user to get all of the data on screen at once.
On top of that is the security issues... there is a much higher chance of your web traffic (and thus database connection details) being intercepted and played with, because it will clearly stand out as database communications rather than normal traffic - so you are likely to have your data corrupted/stolen.
Due to that kind of thing many web hosts will not allow remote database connections even if you specifically request it. Depending on how they have things set up, it could compromise the security of their entire network.
Also, this brings me to the decision of asp.net vs php. Are both easy to connect to MYsql?
Yes, for .Net you just need to download the Connector - there is a link in our Database Development FAQs/Tutorials (at the top of this forum)
Apart from the names (eg: MySQLCommand rather than OLEDBCommand or SQLCommand) the rest of the code you used before should be very close to what you need.
And can I have one user updating/ adding records to the tables whislt the other 30 users are reading data from the database?
Absolutely.
-
Jun 26th, 2010, 03:45 PM
#5
Thread Starter
New Member
Re: Mutilple user access database VB.NET
Thanks,
Would it be possible to use an access database located on the host if I was using asp.net? I really have no experiance with SQL and am very reluctant to use it because the whole thing requires resetting up whenever I start developing on another computer or moving to a host.
Also if this were to work, could multiple people read from it whilst someone adds to it? Finally how would you stop people downloading the database as if you typed in the url it would appear? Or would you just password protect and encrypt it?
Note: This is a school project, so everything is sort of theoretical, i.e. it is not too important if it would be a bit slow if everyone was accessing it at once.
Thanks
Callum
Last edited by callumh27; Jun 26th, 2010 at 03:48 PM.
-
Jun 27th, 2010, 04:36 AM
#6
Re: Mutilple user access database VB.NET
 Originally Posted by callumh27
Would it be possible to use an access database located on the host if I was using asp.net?
Yes, because you will only technically have one user (the ASP engine), and it will be local.
I really have no experiance with SQL and am very reluctant to use it because the whole thing requires resetting up whenever I start developing on another computer or moving to a host.
I would normally debate this, but I think you are right for a school project.
Also if this were to work, could multiple people read from it whilst someone adds to it?
Yes.
Finally how would you stop people downloading the database as if you typed in the url it would appear? Or would you just password protect and encrypt it?
I'm not sure of the details because I don't use ASP.Net, but there should be a safe folder within your host that you can put the database in to, which cannot be accessed via the web (only via the hosting control panel).
-
Jun 27th, 2010, 03:36 PM
#7
Thread Starter
New Member
Re: Mutilple user access database VB.NET
Thanks for the help si, but after further research I have decided upon using PHP and MYSQL. For a few reasons, the first being I have done a project before in it a long time ago, but I still have the knowledge of how It can be set up on a host and how php can be intregrated in web pages, whereas with ASP I have no clue as it's harder to find information tools for it. Finally I despise visual web developer as there is almost no logic to how it actually produces web pages e.g producing vb pages, ***?
Anyway
Thanks for your help
Callum
-
Jun 28th, 2010, 04:59 AM
#8
Thread Starter
New Member
Re: Mutilple user access database VB.NET
One last idea,
would connecting to a MYSQL database on a host using VB still incur the same problems as access, i.e. slow, inefficient, insecure? when 30 computers are accessing the data, or would PHP still be the superior option?
-
Jun 28th, 2010, 08:16 AM
#9
Re: Mutilple user access database VB.NET
 Originally Posted by callumh27
Thanks for the help si, but after further research I have decided upon using PHP and MYSQL. For a few reasons, ...
That's fair enough. 
would connecting to a MYSQL database on a host using VB still incur the same problems as access, i.e. slow, inefficient, insecure? when 30 computers are accessing the data, or would PHP still be the superior option?
Connecting to any database via the internet has those problems. Access is even worse because it isn't designed for that kind of thing (even having multiple users on a local network is pushing the limits).
Using a server side application in something like PHP or ASP is the better option.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|