Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2006, 02:20 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server Access across a remote machine

I was just trying out Microsoft SQL Server 2000. I created a sample VB.NET 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.

 
Old July 24th, 2006, 03:44 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make sure the connection string is the same, or if you are using integrated security, make sure that both users which run the application has the appriopriate rights to the database server.

 
Old July 24th, 2006, 03:56 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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()
 
Old July 27th, 2006, 02:28 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think if I understand what your saying is that you have to connect from one computer to the other to get to ths same sql server. You wrote your app to connect to your local computers sql server. When you run your app on your friends computer it doesn't have a local sql server to connect to. You have to connect to your computers SQL. Basically networking is involved. Try to connect by ip address or machine name to start with.






Similar Threads
Thread Thread Starter Forum Replies Last Post
'Remote server machine does not exist...' GandolftheWhite Excel VBA 7 September 13th, 2013 09:05 AM
Retore Db from a remote machine to a local machine srkvellanki BOOK: Beginning SQL 0 October 3rd, 2008 05:17 PM
Remote Access to SQL Server Express Bob Bedell .NET Web Services 6 December 21st, 2007 10:50 AM
SQL Server Remote Access error sterreyl BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 April 18th, 2007 01:24 PM
'Remote server machine does not exist..." GandolftheWhite Pro VB Databases 0 November 15th, 2004 12:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.