Re: Connection Error: ADO.Net and SQL Server 2005
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxx>
- Date: Sat, 7 Jul 2007 09:59:41 -0700
Okay, User ID and Trusted Connection are mutually exclusive. Either your
Windows ID is trusted or it's not. Did you read the whitepaper on
connecting?
--
____________________________________
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)
-----------------------------------------------------------------------------------------------------------------------
"Maer" <maer@xxxxxxxxxxxxxxxxx> wrote in message
news:uuvLyFBwHHA.4992@xxxxxxxxxxxxxxxxxxxxxxx
Hi Bill,
Thank you for your reply. I am actually using SqlClient, I only created
an ODBC connection to troubleshoot the problem.
So basically, I can connect to the server through an ODBC connection
(in the Data Sources in Windows), but when I try to use SqlClient to
establish a connection, it fails. The connection string is something like
this:
"data source=servername;persist security info=True;initial
catalog=databasename;user id=username;Trusted_Connection=yes"
Once again, the error is "General Connection Error...[Microsoft][ODBC
SQL Server Driver][DBNETLIB]ConnectionRead (rec())."
It is very puzzling because this client doesn't seem to have anything
different in his configuration.
So far I haven't heard of any problems with .Net 2.0 and SQL Server
2005. Could it be .Net?
Thanks,
Maer
"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxx> wrote in message
news:eCBwqunvHHA.1212@xxxxxxxxxxxxxxxxxxxxxxx
Well, using ODBC to connect to SQL Server (any version) can and does
work. However, it's certainly not the best way to do so--I recommend
SqlClient. Search my blog for "Connecting" and read the whitepapers there
that discuss the issues.
hth
--
____________________________________
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)
-----------------------------------------------------------------------------------------------------------------------
"Maer" <maer@xxxxxxxxxxxxxxxxx> wrote in message
news:e$qgOMlvHHA.5036@xxxxxxxxxxxxxxxxxxxxxxx
Hi guys,
I have an application that uses ADO.Net (2.0) to connect to SQL
Server. We've never had any problems connecting to SQL Server 2005 using
this application, but one client has had problems and the error he gets
is of the type "General Connection Error...[Microsoft][ODBC SQL Server
Driver][DBNETLIB]ConnectionRead (rec())."
I asked him to create an ODBC connection in Windows just to see if it
was only the application, and he has no problem connecting through ODBC.
So, as you can see, it is very puzzling because when we've had
problems in the past, ODBC would not work either.
Is there some issue with ADO.Net (2.0) and SQL Server 2005? Remember
that other clients are using the software connecting to SQL 2005 with no
problem.
The user says that Firewall is disabled and Remote Connection is
enabled at the server.
Anything else I could check??
Any help will be greatly appreciated.
Thank you,
Maer
.
- Follow-Ups:
- References:
- Connection Error: ADO.Net and SQL Server 2005
- From: Maer
- Re: Connection Error: ADO.Net and SQL Server 2005
- From: William \(Bill\) Vaughn
- Re: Connection Error: ADO.Net and SQL Server 2005
- From: Maer
- Connection Error: ADO.Net and SQL Server 2005
- Prev by Date: Re: Connection Error: ADO.Net and SQL Server 2005
- Next by Date: Re: connect from webservice
- Previous by thread: Re: Connection Error: ADO.Net and SQL Server 2005
- Next by thread: Re: Connection Error: ADO.Net and SQL Server 2005
- Index(es):
Relevant Pages
|
Loading