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.
Author |
Topic |
san79
Starting Member
42 Posts |
Posted - 2008-04-07 : 08:54:58
|
hi alli am having a sql server 2000 sp2 installed in a win2k3 machine, and i have installed msde2000 in a client machine running winxp sp2.i disabled the firewall for both the systems.now i am able to connect the instance in server through osql utility but when i try to connect it in vs.net 2003 it says the sql server does not exists. i tried various solutions like giving sa and password in the connection string, in the IIS changing the directory security to integrated windows authentication, checking the client network utility and find port number is blocked or not etc., still i am receiving the same error. Imports System.DataImports System.Data.SqlClientPublic Class Dataconnection Dim strCon As String Sub New() 'strCon = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Employee;Data Source=SERVER2;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=EMPRISE;Use Encryption for Data=False;Tag with column collation when possible=False" strCon = "Server=Server2; Database=Employee; User Id=sa; password=Admin" End Sub Public Function CreateConnection(ByVal con As SqlConnection) As Boolean Try con.ConnectionString = strCon con.Open() CreateConnection = True Catch ex As SqlException Throw ex CreateConnection = False End Try End Function and this is the error message System.Data.SqlClient.SqlException: SQL Server does not exist or access denied. at WebApplication1.Dataconnection.CreateConnection(SqlConnection con) in whats wrong with this please help me out |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-07 : 09:57:53
|
There is a real twist in the tale,with the same code i was able to access winforms using vb.net but this failed in asp.net puzzeled :-( |
 |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2008-04-07 : 10:00:58
|
What is your code looks like on the part that calls the CreateConnection? In general, you can eliminate the possible problems by trying some of these:To leave out the web sever, make a win app call from vs.net from the same dev machine.To rule out the login credential setting, try another sql2k server, or use UDL/DSN to verify you got the right connection string. You may also test the connection under some of the data binding controls through dot net IDE UI desinger instead of hard-code them first. |
 |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-07 : 10:06:02
|
strange bossi tried to create a udl / dsn which results test connection successful, as i posted earlier 2nd post winapplication calls also success, <strCon = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Employee;Data Source=SERVER2;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=EMPRISE;Use Encryption for Data=False;Tag with column collation when possible=False"> this is system generated connection string from the server explorer properties, all are failed with asp.net but succeeds with win app.dont know why |
 |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2008-04-07 : 10:54:07
|
Then the web server settings are the most likely causes. |
 |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-07 : 23:59:32
|
k will google around for web server settings |
 |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-10 : 02:19:25
|
hello to allactually the problem was with win2k3 server and sql2k server , i am having only sp2 for sql2k so i need to apply sp3a for the server, and its working now for further details please follow the linkhttp://support.microsoft.com/kb/884012best wishes |
 |
|
|
|
|
|
|