Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Database access strategy

Reply
 
Old 12-23-2008   #1 (permalink)


 
 

Database access strategy

I've developed an app for our company using VB.NET (winforms) and SQL server
express running on our SBS server.

The app works really well within our LAN but I often work remotely and quite
often would benefit from using my custom app. I've tried the VPN but for
some reason my app just won't connect to the database.

What I'd like is some advise about how I can allow remote clients to access
a SQL database that lives inside our LAN. I've never done any work with web
services but I thought I might be able to do something there. Or maybe it's
a simple matter of a firewall port and a clever connection string.

Any advice on the best strategies to adopt for this problem would be hugely
appreciated.

TIA

Russ


My System SpecsSystem Spec
Old 12-23-2008   #2 (permalink)
sloan


 
 

Re: Database access strategy


If you want to talk to Sql Server directly, then you need two things:

Be able to ping the Sql Server Box.
Open up (usually) port 1433.

check www.connectionstrings.com for a connection string that has the IP and
Port Number in it. (Which is kinda like the most anal way to define a
connection string).

OR

You can also expose services to the outside world, instead of your database.
WCF is one of the latest for that.

See
http://sholliday.spaces.live.com/Blo...842A!158.entry
for a basic WCF example.

My example is based on a DotNet to DotNet world, as opposed to a Java to
DotNet world for example.

Juval Lowy's book on Programming WCF services would help you out alot "in
general" about the "Software as Service(s)" approach.



You can also google:
Microsoft REST
Microsoft Astoria

for another flavor.






<russ.green@xxxxxx> wrote in message
news:1DFD8830-42FD-45BE-8570-B5CA0A7A18F8@xxxxxx
Quote:

> I've developed an app for our company using VB.NET (winforms) and SQL
> server express running on our SBS server.
>
> The app works really well within our LAN but I often work remotely and
> quite often would benefit from using my custom app. I've tried the VPN
> but for some reason my app just won't connect to the database.
>
> What I'd like is some advise about how I can allow remote clients to
> access a SQL database that lives inside our LAN. I've never done any work
> with web services but I thought I might be able to do something there. Or
> maybe it's a simple matter of a firewall port and a clever connection
> string.
>
> Any advice on the best strategies to adopt for this problem would be
> hugely appreciated.
>
> TIA
>
> Russ

My System SpecsSystem Spec
Old 12-26-2008   #3 (permalink)
harborsparrow


 
 

Re: Database access strategy

On Dec 23, 12:54*pm, <russ.gr...@xxxxxx> wrote:
Quote:

> I've developed an app for our company using VB.NET (winforms) and SQL server
> express running on our SBS server.
>
> The app works really well within our LAN but I often work remotely and quite
> often would benefit from using my custom app. *I've tried the VPN but for
> some reason my app just won't connect to the database.
>
> What I'd like is some advise about how I can allow remote clients to access
> a SQL database that lives inside our LAN. I've never done any work with web
> services but I thought I might be able to do something there. *Or maybeit's
> a simple matter of a firewall port and a clever connection string.
>
> Any advice on the best strategies to adopt for this problem would be hugely
> appreciated.
>
> TIA
>
> Russ
Web services in .NET are the way to go, assuming the web service will
scale (that is, is not having hundreds of simultaneous hits or
something). It's really quite trivial to do them using .NET 2 or
later.

I've got a small tutorial online at http://www.harbormist.com/cis573_06B...ices/index.htm
and there are many other sources. It's really a small learning curve,
and it just works.
My System SpecsSystem Spec
Old 12-27-2008   #4 (permalink)
Russ Green


 
 

Re: Database access strategy

Thanks....Nice tutorials....I'll give them a go first.....I was just this
minute about to dive into WCF for the first time.

My System SpecsSystem Spec
Old 12-29-2008   #5 (permalink)
William Vaughn \(MVP\)


 
 

Re: Database access strategy

We've discussed this many times. I have a summary of the connection issues
on my blog (search for "connecting"). Remember, SQL Server 2005 no longer
broadcasts its presence on the network so you also need to run the SQL
Browser service on the host server to make is visible. I think for your
situation a VPN is (by far) the most reasonable approach. See Chapter 9 of
my book for more details. I focus quite a bit on Windows Forms applications
(in VB.NET).

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com/blog/billva
http://betav.com
____________________________________________________________________________________________



<russ.green@xxxxxx> wrote in message
news:1DFD8830-42FD-45BE-8570-B5CA0A7A18F8@xxxxxx
Quote:

> I've developed an app for our company using VB.NET (winforms) and SQL
> server express running on our SBS server.
>
> The app works really well within our LAN but I often work remotely and
> quite often would benefit from using my custom app. I've tried the VPN
> but for some reason my app just won't connect to the database.
>
> What I'd like is some advise about how I can allow remote clients to
> access a SQL database that lives inside our LAN. I've never done any work
> with web services but I thought I might be able to do something there. Or
> maybe it's a simple matter of a firewall port and a clever connection
> string.
>
> Any advice on the best strategies to adopt for this problem would be
> hugely appreciated.
>
> TIA
>
> Russ
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Database access... VB Script
Writing to an access database PowerShell
Win XP SP3 database access VB Script
access database .. PowerShell
Q&A: Key Updates to Microsoft's Security and Access Product Strategy Unveiled Vista News


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46