Sunday 25 March 2012

connect to server via intranet - how is it done (new to this)

Hi all!

I have msde2000 on one machine. want to connect to it from other machine. both machines are connected via a switch with integrated firewall.

Do I need to set up this firewall to enable connections? Like opening ports for msde in the virtual servers settings of the firewall?

If I do this, will that make my sql-server visible and accessible to the internet?

Or should I be able to find my sql server without such steps. And if so how?

networking is up and i can access folders of both machines via the intranet. Is that enough or do i need more settings here?

Let's say the machine and thus the server is called Alpha. What goes into my connectionstring from the other machine?

this wont be enough, right?
strconn = "Provider=SQLOLEDB;" & _
"Data Source="Alpha";"

Please shed some light on these questions.

tia

KumaFirst you will have to configure the ODBC settings in your machine. Make sure the datasource name is "alpha" , the same as the server name. You can then use "alpha" in the connection string. The code that is required is

'VB Code starts here

Set db = New ADODB.Connection

db.Properties("Data Source").Value = "alpha"
db.Properties("Initial Catalog").Value = "Northwind"
db.Properties("User ID").Value ="XXX"
db.Properties("Password").Value = "YYYYY"
db.Open

'ASP Code starts here
Set db = Server.CreateObject("ADODB.Connection")
db.Open "Provider=SQLOLEDB;Data Source=alpha;Initial Catalog=Northwind;User Id=XXX;Password=YYY"

'CODE ENDS HERE

Roshmi Choudhury

No comments:

Post a Comment