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
 SQL Server Access across a remote machine

Author  Topic 

rajen84
Starting Member

7 Posts

Posted - 2006-07-24 : 03:39:59
I was just trying out SQL Server 2000. I created a sample application which reads in 2 values from a textbox and writes it into a databse. This application works fine on my computer and the values are written to the database (In the connection string, I give my IP address as the datasource so that anyone on the internet can hit this database). However, when I copy this application to another computer and try to run it, it gives me an error "SQL Server does not exist or access is denied." I know this is a minor problem with some setting, but I haven't been able to find the solution on the internet. Can someone whose worked with Microsoft SQL Server 2000 please help me out.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-07-24 : 10:20:58
> I give my IP address as the datasource so that anyone on the internet can hit this database

this isn't true. if you're behind a firewall this doesn't work.
Are you in a LAN enviroment?
can you ping the sql server from your other machine?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rajen84
Starting Member

7 Posts

Posted - 2006-07-24 : 21:44:05
I am on a wireless environment. The other laptop is able to ping my laptop and get a response as well. Firewall is turned off.
Go to Top of Page

dfiala
Posting Yak Master

116 Posts

Posted - 2006-07-24 : 21:51:21
What's your connection string? Are you using SQL Authentication or Windows Authentication?

Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP
Go to Top of Page

rajen84
Starting Member

7 Posts

Posted - 2006-07-24 : 21:58:21
It is actually a VB.NET application. When i run the application on my machine, the values get inserted into the database since the database is hosted on my personal laptop. But when i run the same application from a friend's laptop, I get the error message "SQL Server does not exist or access is denied. Below is the snippet of my code:


Dim insert_values as string = "'" + textbox1.text + "','" + textbox2.text + "'"

Dim cnOra As New OleDbConnection("Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd")

cnOra.Open()

Dim cmdUpdate As New OleDbCommand _
("INSERT INTO APP_STR(PARAM_NM,PARAM_VAL) VALUES(" + insert_values + ")", cnOra)
cmdUpdate.CommandType = CommandType.Text

cmdUpdate.ExecuteNonQuery()

SQL Server is on mixed mode authentication
Go to Top of Page

dfiala
Posting Yak Master

116 Posts

Posted - 2006-07-24 : 22:19:30
Connection string looks fine -- this is a network issue.

Can you ping 190.190.200.100 from your friend's laptop?

If so, can you telnet into 190.190.200.100, 1433?





Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP
Go to Top of Page

rajen84
Starting Member

7 Posts

Posted - 2006-07-25 : 06:57:55
A ping works. Response is received successfully. However, a telnet fails. I get the message that the a telnet connection cannot be opened on the port 1433.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-07-25 : 07:13:12
open that port in your firewall.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -