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 - Connecting to a VPN Database

Reply
 
Old 01-27-2009   #1 (permalink)
kohl.mike


 
 

Connecting to a VPN Database

I've been having an on going problem.

About 6 months ago I was given a huge project at work, and one of the
tasks was to restucture an existing database, which contains around
50+ Sql Tables. The new Database is on the sql server at work.

To make a long story short, the company I work for, is going to
outsource the project to me and I will be working on it from home in
my spare time.

The problem is, the database is on the server at work, and I can not
connect to the database.

The project Im working on is in vs2008, the language I am using is C#,
and The sql server i believe is 2005. My employer gave me the
information to set up a VPN.

Now the strange thing is if i can add a connection to the database
explorer in visual studio and access the database from there, the
problem that I am having is thru the connection string within in the
application.

The following is the original SQL connection string that I use when im
at work:

public static string connectionString = "Data Source=xxxxx;Initial
Catalog=xxxx;Integrated Security=True;Pooling=False";


After connection to the database in the database explore and I click
on the properties for that database, the following is the connection
string that I get:

Data Source=11.0.11.11,1234;Initial Catalog=xxxx;User
ID=xxxx;Password=***********

notice on the datasource their is a comma, 1234. I believe this is
the open port, and also notice how the password has *****.


Does anyone know what I need to do to connect to this database? Is it
just a setting on the server that needs modified? I have told my
employer in the past of my problem, several times, and basically they
just say i should be able to connect to it.. and they don't seem to
know what the problem is.


My System SpecsSystem Spec
Old 01-27-2009   #2 (permalink)
Norman Yuan


 
 

Re: Connecting to a VPN Database

The difference of the two ConnecctionString is one uses Windows Integrated
security, the other you was given uses SQL Server security. As long as the
ConnectionStringare correct according to the SQL Server configuration, you
should be able to connect, whether you connect to it directly from internal
network LAN or from VPN (if you can log into the VPN correctly). However,
use Port 1234 is unusual. Default port for SQL Server is 1433. Although it
can be configured to use any port, such as 1234, but usually, there is no
need to change the default port.

One thing I suggest is to do your development work in local SQL Server
instance, rather than connect to a remote one. If the remote one is
production SQL Server, you should not connect your Visual Studio to it at
all. Just get a developer edition of SQL Server2005/8 ($50) and install it
on your computer, then get a backup of your targeting database and restore
to your computer, off you go. Once your development is done and tested, you
can update your changes back to the production SQL Server in proper way.

<kohl.mike@xxxxxx> wrote in message
news:720f9baf-dec1-4278-8384-2e86e1855566@xxxxxx
Quote:

> I've been having an on going problem.
>
> About 6 months ago I was given a huge project at work, and one of the
> tasks was to restucture an existing database, which contains around
> 50+ Sql Tables. The new Database is on the sql server at work.
>
> To make a long story short, the company I work for, is going to
> outsource the project to me and I will be working on it from home in
> my spare time.
>
> The problem is, the database is on the server at work, and I can not
> connect to the database.
>
> The project Im working on is in vs2008, the language I am using is C#,
> and The sql server i believe is 2005. My employer gave me the
> information to set up a VPN.
>
> Now the strange thing is if i can add a connection to the database
> explorer in visual studio and access the database from there, the
> problem that I am having is thru the connection string within in the
> application.
>
> The following is the original SQL connection string that I use when im
> at work:
>
> public static string connectionString = "Data Source=xxxxx;Initial
> Catalog=xxxx;Integrated Security=True;Pooling=False";
>
>
> After connection to the database in the database explore and I click
> on the properties for that database, the following is the connection
> string that I get:
>
> Data Source=11.0.11.11,1234;Initial Catalog=xxxx;User
> ID=xxxx;Password=***********
>
> notice on the datasource their is a comma, 1234. I believe this is
> the open port, and also notice how the password has *****.
>
>
> Does anyone know what I need to do to connect to this database? Is it
> just a setting on the server that needs modified? I have told my
> employer in the past of my problem, several times, and basically they
> just say i should be able to connect to it.. and they don't seem to
> know what the problem is.
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
database .NET General
'Connect' database for WLM? Live Mail
Database Search VB Script
Works database 2007 and Office database 2003 .NET General
Compacting the database Live Mail


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