By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,265 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,265 IT Pros & Developers. It's quick & easy.

SQL server does not exits....

P: 16
i have 1 new .aspx page where i run on my local host it can run normally but when i run at another computer it show the error:



here is my connection:
Expand|Select|Wrap|Line Numbers
  1.             conn5 = New SqlConnection(ConnStr)
  2.             cmd5 = New SqlCommand(lsSQLSTRX, conn5)
  3.             adp5 = New SqlDataAdapter(cmd5)
  4.             lds5 = New DataSet
  5.             DT5 = New DataTable
  6.             adp5.Fill(lds5, "x")
  7.             DT5 = lds5.Tables(0)
  8.  
  9. ConnStr = "data source=" & Trim(lsSAL_SERVER) & ";initial catalog=" & Trim(lsSAL_DATABASE) & ";password=" & Trim(lsSAL_PASSWORD) & ";user id=" & Trim(lsSAL_USERID) & ";"    
  10.  
anyone know please help me...thanks...
Feb 7 '09 #1
Share this Question
Share on Google+
4 Replies


ck9663
Expert 2.5K+
P: 2,878
You have to connect to your sql server from your web server. Your connection string does not include your server name/setting. so it's looking for a local server or the server residing in the same box.

-- CK
Feb 8 '09 #2

P: 16
thanks for your reply... but can i know how to write the code with include the server.....
Feb 8 '09 #3

ck9663
Expert 2.5K+
P: 2,878
Here are some useful links


Connection Strings

DSN-Less Connections
Feb 13 '09 #4

P: 16
thanks...i get the solution....
Mar 4 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.