If you can't get connected to SQL Server, you need to help us help you by providing the answers to as many of these questions as possible:
a.. The version of SQL Server you're accessing. For example, SQL Server 2000, SP3.
b.. Are you accessing SQL Express via User Instance?
c.. Are you attempting to connect by opening/attaching an .MDF database?
d.. Have you configured your SQL Server instance to be visible to the network? What ports/protocols are enabled?
e.. Are you attempting to open a local instance of SQL Server on your own system or a remote instance on a network or WAN share.
f.. What type of connection are you attempting? For example, named instance ("myserver\myinstance"), or a TCP/IP, port connection.
g.. What authentication you're attempting: For example, Integrated Security or SQL Server authentication.
h.. What rights you have on the server and network. Is the user an admin or a simple user with limited rights?
i.. What rights do you have on the target database?
j.. What version of ADO or other data access interface are you using? Are you using COM-based ADO (which version?) or ADO.NET?
k.. What provider or driver are you using? SqlClient, SqlCe, OleDb, Odbc or something else?
l.. Is the application a Windows Forms, ASP.NET a web service or something else?
m.. What have you tried so far? Let's see your ConnectionString. Nope, don't show us your username or password.
n.. What exception message are you getting? Make sure you wrap your code in a Try/Catch block to trap the exception. If you're using ADO classic, send us as many errors as you can.
I also suggest reading one or more of the whitepapers, articles and books that deal with 99% of the issues encountered when trying to get connected. Might I suggest http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html or http://www.sqlmag.com/Articles/Index.cfm?ArticleID=38356. I also include an entire chapter on getting connected (to SQL Server) in my new books.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
I have a 2k3 web v6 server and a 2k3 SQL2005-SP1 server.
I created a SQL2005 user login calendar so there would be an 'instance'
although that is confusing. ODBC works great.
Our web server is suppose to call the .mdf database via a connection
settings in a common.asp file.
Set values for the configuration variables
'--
Config_ServerURL = "http://10.70.1.223/vcalendar/"
Config_DBConnString = "Provider=SQLOLEDB.1;Persist Security
Info=False;Initial Catalog=;Data Source=//midb01/d$/sql"
Config_DBUser = "calendar"
Config_DBPassword = "password"
Config_DBType = "MSSQLServer"
CalendarIsInstalled = True
I setup a db user calendar associated with the login name. Set the db user
calendar to a schema that has connect rights only - tired full dbo which
didn't work either.
"William (Bill) Vaughn" wrote:
> If you can't get connected to SQL Server, you need to help us help you by providing the answers to as many of these questions as possible:
> a.. The version of SQL Server you're accessing. For example, SQL Server 2000, SP3.
> b.. Are you accessing SQL Express via User Instance?
> c.. Are you attempting to connect by opening/attaching an .MDF database?
> d.. Have you configured your SQL Server instance to be visible to the network? What ports/protocols are enabled?
> e.. Are you attempting to open a local instance of SQL Server on your own system or a remote instance on a network or WAN share.
> f.. What type of connection are you attempting? For example, named instance ("myserver\myinstance"), or a TCP/IP, port connection.
> g.. What authentication you're attempting: For example, Integrated Security or SQL Server authentication.
> h.. What rights you have on the server and network. Is the user an admin or a simple user with limited rights?
> i.. What rights do you have on the target database?
> j.. What version of ADO or other data access interface are you using? Are you using COM-based ADO (which version?) or ADO.NET?
> k.. What provider or driver are you using? SqlClient, SqlCe, OleDb, Odbc or something else?
> l.. Is the application a Windows Forms, ASP.NET a web service or something else?
> m.. What have you tried so far? Let's see your ConnectionString. Nope, don't show us your username or password.
> n.. What exception message are you getting? Make sure you wrap your code in a Try/Catch block to trap the exception. If you're using ADO classic, send us as many errors as you can.
> I also suggest reading one or more of the whitepapers, articles and books that deal with 99% of the issues encountered when trying to get connected. Might I suggest http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html or http://www.sqlmag.com/Articles/Index.cfm?ArticleID=38356. I also include an entire chapter on getting connected (to SQL Server) in my new books.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment