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

Problem in Accessing SQL Server from .net

P: 8

I have a sql server instance named Pedrollo-yxczvi\warranty with sql server instances. I hv written following connection string for connecting with the database:

_connectionString = "Server=PEDROLLO-YXCZVI\WARRANTY;Database=MarketAnalysis;User ID=usr;Password=pass;"

but the program giving error "Server doesn't exist or access denied" though I am accessing the same instance from my other program written in 6.0.
but when i am changing to another instance of sql server running on other computer ; this equivalant code is working.

I am just wonder is there any problem about naming of this instance or limitation of .net developer regarding this.

Can anybody help me?

Apr 24 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 692

Try using this connectionString

"Provider=SQLOLEDB.1;Persist Security Info=True;User ID=usr; password=pass;Initial Catalog=MarketAnalysis ;Data Source=PEDROLLO-YXCZVI\WARRANTY"
Apr 24 '07 #2

P: 5
Try this

connectionString="Server=YourServer;Database=YourD atabase;uid=sa;pwd=1234;" providerName="System.Data.SqlClient"

Make sure that what ever name you give your server that you can ping it from a command promt with that name or it might not be able to find it on the network

For example you might need instead of the just the machine name
Apr 27 '07 #3

Post your reply

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