Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 connectionstring to my local db

Author  Topic 

maxim
Yak Posting Veteran

51 Posts

Posted - 2006-11-19 : 17:14:07
Hello all!

I'm having problems exporting my db content...

I have a asp.net script that make all this for me!

I just need to connect to the two databases: Local and online db

Supose that I try to run this aplication on line (Where are my db) I use this connection string to connect to online db:
server=whsql-v12.prod.mesa1.secureserver.net;database=mydb;uid=mylogin;pwd=mypwd

But i don't know how can i connect to my local database through my online webapplication!

I don't know if i had explain correctly my problem

Can anyone of you please tell me this connectionstring??

Thanks!
Max

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-11-19 : 17:48:49
See www.connectionstrings.com
Go to Top of Page

maxim
Yak Posting Veteran

51 Posts

Posted - 2006-11-19 : 17:53:23
quote:
Originally posted by afrika

See www.connectionstrings.com



I had seen that page, but I don't find information for my problem!

Please read my post.

I have an online webapllication and want to connect to my local database...
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-11-19 : 17:53:44
Just a minute

are you trying to connect your local database to the remote database via EM or QA ?

If so, either register your server in EM and connect via EM or QA or use a VPN, or via web interface using web data admin

Afrika
Go to Top of Page

maxim
Yak Posting Veteran

51 Posts

Posted - 2006-11-19 : 18:51:20
I don't know what do you mean for "EM" and "QA"...

I want a webpage who connects to my local database and my online database... The connectionstring for online database my hosting provider tell me what is... But I want to know what is the connectionstring to connect to my local db... But remember that the site isn't on my localhost but on my online server.

I can't be more explicit...

Max
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-19 : 19:10:00
if you mean connecting to the sql server residing in your local machine, just set server = 127.0.0.1


KH

Go to Top of Page

maxim
Yak Posting Veteran

51 Posts

Posted - 2006-11-19 : 19:56:08
quote:
Originally posted by khtan

if you mean connecting to the sql server residing in your local machine, just set server = 127.0.0.1




But Khtan, when i upload my site, doens't "127.0.0.1" point to the machine where I uploaded my site?

Imagine... If you want that this page "sqlteam" show to you a table content that you have on you local db, what connection string did this page have it?

Just...
"server=127.0.0.1;database=mydb;uid=sa;"

?

Thanks,
Max
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-11-20 : 01:30:38
QA Means Query Analyzer, EM means enterprise manager.

127.0.0.1 is the IP for the local database, thats if your IP is not configure to have a static IP.

Your remote db, should have either a name or an IP address given by your hosting provider.

This is the info, i got from the above url www.connectionstrings.com



Standard Security:

"Data Source=Aron1;Initial Catalog=pubs;User Id=myUsername;Password=myPassword;"
- or -
"Server=Aron1;Database=pubs;User ID=myUsername;Password=myPassword;Trusted_Connection=False"
(both connection strings produces the same result)




Trusted Connection:

"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or -
"Server=Aron1;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)

(use serverName\instanceName as Data Source to use an specifik SQLServer instance, only SQLServer2000)
Connect via an IP address:

"Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=myUsername;Password=myPassword;"
Go to Top of Page
   

- Advertisement -