Solved

Database application across more than one site

Posted on 2004-08-17
22
248 Views
Last Modified: 2010-04-23
I have a very simple WinForms application written in VB.Net and using MSDE; the application keeps track of vehicle bookings.  This works great on a standalone machine, but if the business owner wishes to open up another branch several miles away, I need to know the best way of altering the application to allow both sites to share the same database - rather than each branch manager making 200 telephone calls a day trying to see if the other branch has a certain vehicle available.  So...

What do I do...?

So as not to appear lazy, I'll make some suggestions:

1.  Get the business owner to invest in a Wide Area Network connection.
Presumably this would enable me to install the application on two (or more) PCs and simply tell both applications where the database is located???  Is this a realistic appraisal of what is required to operate over a WAN, or am I in for a rude awakening?!!   :D

2.  Modify the application to allow it to "tell" the other machine that a booking of "vehicle number 25" has been requested -- eg by sending/receiving e-mails to and from whichever machine is running it.  I guess the logic to this might be difficult to perfect, and might create problems (eg. double-bookings etc) if there is any delay in the e-mail being sent or received. Also, I have never attempted e-mail communications within the guts of an application, so I find this idea unattractive to say the least!   :D

3.  Learn ASP.Net.  I know little or nothing about this topic.  Presumbaly, it would allow me to have the database hosted on a remote server (or website??) somewhere and have each application access and update the database as necessary?  Would the business owner need to buy a website?

Please give me a some feedback on each of the above suggestions.  Or if there is another way then please let me know.  I'm meeting with the business owner tomorrow so swift responses would be swell!!  And I know that answering this question properly will cost you the best part of an entire lunchbreak, so the full 500 big ones are up for grabs.

Thanks in advance.
0
Comment
Question by:Sigh_Man
  • 8
  • 8
  • 6
22 Comments
 
LVL 25

Assisted Solution

by:RonaldBiemans
RonaldBiemans earned 250 total points
ID: 11818772
I would personally go for the web approach (ASP.net).
You wouldn't have to invest in a webserver, RDBMS etc.., most providers will have an option to provide and host it for you (in exchange for some monthly fee:-)).
I think most of your VB code will still be usuable (except for the userinterface part). You will ofcourse have to learn asp.net but that seems to me like a big plus.
And I would invest some resources in security.

Option 1. Is a possibility but that would not work with the MSDE you would need to invest in the full SQL server. I don't know how it is over where you are but that WAN connection is pretty expensive over here, and if more branches are planned for the future.

Option 2. That option doesn't appear to  be a save way to go at all. There are to many weak spots in that approach.
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11818974
Thanks for that.

I agree that Suggestion number 2 would be heading for disaster!

Just a few questions:

1.  Do you recommend any particular books on ASP.Net?  (I've generally found the Wrox books pretty OK)

2.  There's some stuff in my current texts on "Web Forms" and "Web Services" -- does ASP.Net encompass both topics or are these totally separate?  Or should I just forget them?!

3.  Do I need to buy SQL Server before I can start learning ASP.Net?  Or is there a mock-webserver built into Visual Studio?  Or is there something similar to MSDE that I could use??

4.  (Back to the original question on the hire business...)  Is it possible to build a WebService that my existing WinForms application(s) can use to share data?  Or does building a Web Service require additional H/W and S/W that I can ill-afford???  (Or should I stop being scared of the unknown and start learning ASP.Net?!!!   :D  )

5.  When learning ASP.Net, is it generally best to make use of some of the 10Mb webspace that comes with my ISP account - to practise accessing/updating stuff - or is it easy to learn it all whilst disconnected and then simply migrate the webserver parts to a 'real' web server prior to deployment of the finished application?

6.  When you say "invest some resources in security", is security just another part of ASP.Net or are you talking about security in terms of Firewalls on the business's PCs etc?

I'm determined to get up to speed with ASP.Net so I will probably treat myself to a new book at the weekend!!  I want to ensure that I am in a position to deliver multi-site database solutions in the future.

Thanks again.
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11819180
I won't ask any more after this, by the way!!    :D
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11819250
1. I personally found these very good
http://www.devasp.com/store/shop71/pd0735618909/Books_and_Software/Books/By_Product_Name/ASP_Books/
http://www.devasp.com/store/shop71/pd0596004877/Books_and_Software/Books/By_Product_Name/ASP_Books/
http://www.devasp.com/store/shop71/pd0201734400/Books_and_Software/Books/By_Product_Name/ASP_Books/

but stay away from this one it's rubbish

http://www.devasp.com/store/shop71/pd0764557076/Books_and_Software/Books/By_Product_Name/ASP_Books/

2. ASP.Net and VB.net encompass both topics
3. No you don't, you can still use your MSDE or Access for that mather (but MSDE is single user)
4. I think there is (Cassini), otherwise http://asp.net/Projects/Cassini/Download/Default.aspx?tabindex=0&tabid=1
5. You can do both, I build and test locally and from time to time I upload to the our webserver to test if it work there aswell.
6. No, your ISP will have handled that (I hope ;-)) but look at the book I recommended about building secure ASP applications

I you have further question, just ask.
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11819258
Sorry, regarding point 5. Your ISP will have to support the .net framework if he doesn't it won't work
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11819309
Sorry again I forgot to answer point 4. I never had to acquire extra hard- or software to begin using ASP.net.
Just do, and when problems do occur just ask the experts here at EE. That always solved my problems
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11819335

answser to question 1: the book of WROX on ASP.Net is a M.U.S.T. !!

answser to question 2: You can use them, since you are able to program "aspx.vb.net" webservices. So the difference is mostly you program the same language for webpages with some differences but most of the code on the serverside looks very very familiar if your're used to VB.Net.

answser to question 3:  you can download a free version of MSDE: http://www.microsoft.com/sql/msde/downloads/download.asp

answser to question 4: Your webform application should be able to contact your webservice. Look at this example: http://www.thecodeproject.com/vb/net/vbwebservice.asp

answser to question 5: The Asp.Net code won't run on your ISPaccount. They need to have support for ASP.NET!! Ask them... But don't worry, if you are using windows XP (pro?) ,.. you can run your aspx.vb.net webpages/services using the build in Internet Information Services (ISS). If not installed, check configuration manager>software>windows components

answser to question 6: ... I did not wrote the last post ;-)


------

What you also could do is this:

Make sure all computer are hooked up to the internet (online). Put your database online and configure your application to open the SQL database via internet.... If you use a cheap MySQL database (most ISPs/hosting comp. use them) then you might need to alter some of your work.

The big PRO on this is that you wont need to learn and rewrite the app in asp.net. I don't know how big it is,.. but all the userinterface needs to be reconsidered

The bit Pro of using asp.Net is the users need only a PC that online and a username/password to gain access...

For everything is something to say.

About security: my idea is more secure since 'a bad' person can get more easily track of your database and try to hack it (for what reason) in ASP.NET enviroment than an application that they don't have...
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11827321
Ronald,

  >>>3. No you don't, you can still use your MSDE or Access for that mather (but MSDE is single user)

I read on the internet that MSDE can support up to 25 users on a website.  Other than web applications, is it right that MSDE is single user only?  I thought it could support multi-user, as long as each instance of the application 'knows' the location of the database - even if it was across a network...???

Sorry to re-hash the same question, but this is a bit of an upset for me if I cannot program multi-user applications without upgrading to SQL Server.

Thanks again...
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11827328
Sorry - that last point of mine was in relation to WinForms applications in VB.Net by the way.
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11827963
Sigh_Man,

The SQL server is free to serve up to 25 ppl. ("...Basic websites that serve up to 25 concurrent users....")
If you go beyond that number you've to pay. (Maybe the single-user is amount of installs you can do with the same installation... but thats def. NOT)

so you're still in!

Daniël
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11828957
I know that is true for websites, but I wanted to know if there is any way I can use MSDE across LANs or WANs.

I read on the MS website that MSDE must be installed with the application that is going to use it.

So, for example, if I had a client who has a LAN in his office with say 5 PCs -- can I install my WinForms database application onto ALL 5 PCs but have each of the 5 applications accessing just ONE SQL database contained on MSDE?
- Can this be done?  Or does it require full blown version of SQL Server instead of MSDE?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 4

Expert Comment

by:Daniellus83
ID: 11829993

You can do exactly as you descibed!

That the whole idea of a database... but you cannot let more than 25 ppl use the database in on time... then the get the connection refused!

Hope thats convincing you...

Daniël
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11830309
It indeed not very clear but read this

http://www.microsoft.com/sql/msde/productinfo/features.asp

("... MSDE 2000 is a local data engine that can be shared ...")



And this security note on the MSDE 2000 version

http://www.ftponline.com/vsm/2003_06/magazine/columns/databasedesign/default_pf.aspx

Read this:  (".... However, MSDE 2000 can handle most mid-range client/server projects and moderate-load Web applications with aplomb...."


So as I posted earlier: you can better stick with your Windows Application (rather than programming it again in ASP.NET) and use this SQL solution!

Good luck,... Daniël
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11838624
Sorry I didn't know about the possibilty that MSDE could have more than one concurrent user, I've tried that a million times and never been able to get it to work. I can access over the LAN but never with more than one user at a time.
Is there a setting in there daniellus83, during install or something because when I try it the second users connection is always refused.
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11839025
Found this in the Microsoft SQL Community:

--------------------------------------------------------------------------------------------
> I thought that MSDE had a limit of 10 concurrent users?  Is it 25?

No, it is neither.  As I tried to explain, MSDE doesn't have a limit on
concurrent users at all (not 5, not 8, not 10, not 25, not 5000).  There is
a governor that throttles performance at or around 5 simultaneous workloads,
which is *NOT* the same as a connection.

The 25 was a *suggestion* on one of the product pages, for how many
concurrent users a typical system running MSDE could support.  This could be
completely different from project to project, as hardware, application code,
usage, bandwidth, database design etc. can differ, and all of these things
impact how an application performs.  So you will need to test it out to see
how many simultaneous users and/or workloads your specific scenario can
support.

To provide an analogy for the difference between a concurrent user and a
concurrent workload.  Imagine yourself at the DMV, and there are 40 people
waiting around, not doing much.  Two people are at the registration counter,
and one person is getting her picture taken for a new drivers' license.  The
40 people are "concurrent users" and the other three are "concurrent
workloads" - since they're the only ones actually doing anything productive.
--------------------------------------------------------------------------------------------

Read also this (about the build in 'Governor'):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa2_0ciq.asp

Hope it helps.

RonaldBiemans: it might be that the Governor closes down because of the workload... but it sounds of course very strange. I will check my settings... I hope I can help you on this one.
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11839114
That could be the case, the program I tested it on was quite a behemoth. Thanks
0
 
LVL 4

Accepted Solution

by:
Daniellus83 earned 250 total points
ID: 11839284
Ronald:

You should be able to use MSDE with multiple user if you use it normally.

But I was asking myself: (Sigh_Man...)  why not use MySQL?? You have no user/workload-limitations or whatsoever.

Read this article (with a very bright example): http://dev.mysql.com/tech-resources/articles/dotnet/#ODBC.NET

( If you have .Net Framework v1.1 installed, you don't need to install any drivers to be able to access any mySQL database (MyODBC driver is defined in the System.Data assembly!). Else, if you have v1.0, you can download the driver from here:
   
    http://www.microsoft.com/downloads/release.asp?ReleaseID=35715
)

I use it myself.. its free and works great!!

Try it and maybe you like it!

Daniël
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11850065
Guys

The responses have been fantastic.  The only difficulty now is allocating the points for the questions when they develop like this...which of carries the risk of tears and upset from the contributors!!  Both responses were tremendously helpful:  I'm going to award the points equally due to the perseverance of both.  I hope that is OK??!!!

Thanks again.  And stick around!!   :D
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11850078
Haha... I feel the tears already coming... |~.

No way.. I found it amusing... We should do this again!  :-)

I hope Ronald agrees ;-)
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11850138
:D   I'm glad to have caused such a fun-packed question!!!

You'll hate me for this, but:  With LANs and WANs, as far as each PC is concerned, is there no difference between accessing data over a LAN or a WAN?  When I am in the office, we use a WAN between our offices - and when I use eg WORD or EXCEL I simply open up a file - whether it is saved on a local drive or whether it is saved in an office 1,000 miles away in our head office.  Is it the same for accessing data in my VB.Net applications?  ie (going back to the Question!) do I simply code the Sql Connection within the application to the location of the database - whether that database is located on a local drive or on a drive on a WAN?

I'm so sorry for asking - feel free to tell me to get lost!!
You've already more than earned the points!!!   :D
Cheers
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11850304
hehe...

no problemo.

It might be confusing.. but a network is a network. You might have Firewalls / routers/ Virtual Private Networks / Combined WANs.. LANS WHATEVER.... :-)...
..but if you are able to connect (with your application) to your own computer (local database) or 1,000 miles away... You just need to fill in the (IP) address of that computer and to connect. So...

If your computer is connected to the internet... and your firewalls and router (?) is configured all right.. AND you are running a local SQL server... then I should be able to connect to your local database (with the correct username password..)

It all about: being connected and having permission (as well as database-access as firewall configurations)

Hope you are now totally cleared up... :_))

Daniël
0
 
LVL 1

Author Comment

by:Sigh_Man
ID: 11850319
Absolutely!!!!!

Thanks a lot.   :D
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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