sql server connect:
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?=20
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=3D38356. I also =
include an entire chapter on getting connected (to SQL Server) in my new =
books.=20
--=20
____________________________________
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)
-------------------------------------------------------------------------=