SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Server Access across a remote machine
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rajen84
Starting Member

7 Posts

Posted - 07/24/2006 :  03:37:02  Show Profile  Reply with Quote
I was just trying out Microsoft 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.

chiragkhabaria
Flowing Fount of Yak Knowledge

India
1907 Posts

Posted - 07/24/2006 :  03:43:22  Show Profile  Visit chiragkhabaria's Homepage  Send chiragkhabaria a Yahoo! Message  Reply with Quote
You are not able to access the SQL Server from the machine where you installed your application.

Just check if you are able to connect to the SQL Server, using ODBC?

Chirag
Go to Top of Page

krittim
Starting Member

Bangladesh
6 Posts

Posted - 07/25/2006 :  07:58:25  Show Profile  Click to see krittim's MSN Messenger address  Reply with Quote
Try installing SP3 on that SQL Server 2000 machine. If required, change your SQL login to mixed mood & then try.
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 07/25/2006 :  09:02:22  Show Profile  Send jen a Yahoo! Message  Reply with Quote
post your connectionstring, can you ping the sql server from that computer?

--------------------
keeping it simple...
Go to Top of Page

rajen84
Starting Member

7 Posts

Posted - 07/25/2006 :  22:02:58  Show Profile  Reply with Quote
SQL Server is already on mixed mode authentication. 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()

My friend is able to ping my laptop successfully and get a response but however a telnet fails with the message a telnet connection cannot be opened on port 1433.
Go to Top of Page

fasttrack
Starting Member

12 Posts

Posted - 08/03/2006 :  12:37:51  Show Profile  Reply with Quote
Look on sql server log file, check where is ip address and port.

If port is different, replace the port 1433 with the port found in log file.
Go to Top of Page

eyechart
Flowing Fount of Yak Knowledge

USA
3575 Posts

Posted - 08/03/2006 :  13:34:48  Show Profile  Reply with Quote
a couple of questions:

1. what SQL service pack are you running? SELECT @@VERSION from query analyzer will tell you.
2. Are you trying to connect to your database on your local LAN (using private IP addresses like 192.168.x.x) or are you trying to connect over the internet using public IP addresses?
3. Do you have a default instance installed, or is this a named instance?



-ec
Go to Top of Page

rajen84
Starting Member

7 Posts

Posted - 08/03/2006 :  13:55:53  Show Profile  Reply with Quote
1. what SQL service pack are you running? SELECT @@VERSION from query analyzer will tell you.

--Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

2. Are you trying to connect to your database on your local LAN (using private IP addresses like 192.168.x.x) or are you trying to connect over the internet using public IP addresses?

--Its over a private subnet i guess. I am on 190.190.200.100 and my friend who is connecting to me is on 190.1190.200.101. Same wireless router is used.

3. Do you have a default instance installed, or is this a named instance?

-- I'm not sure.. How do I find out?
Go to Top of Page

eyechart
Flowing Fount of Yak Knowledge

USA
3575 Posts

Posted - 08/03/2006 :  14:04:21  Show Profile  Reply with Quote
ok, the first step is to install SP3 or SP4 on your database. go to www.microsoft.com/sql and download and install that service pack and see if things change. A reboot is probably required after install btw.

We'll talk about the other issues after you have done that.


-ec
Go to Top of Page

FrancoisH
Starting Member

1 Posts

Posted - 08/08/2006 :  04:40:29  Show Profile  Reply with Quote
quote:
Originally posted by eyechart

ok, the first step is to install SP3 or SP4 on your database. go to www.microsoft.com/sql and download and install that service pack and see if things change. A reboot is probably required after install btw.

We'll talk about the other issues after you have done that.

Hi

Have problem connecting to sql server(private ip)

Can you help?
-ec

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000