Re: Connection Error: ADO.Net and SQL Server 2005



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










.



Relevant Pages

  • Getting to the bottom of MSDE network connection problems ...
    ... but other than that it is MSDE 2000 with sp3a already applied. ... I've finally figured out the connection problems associated with this, ... and it seems the problems are due to Windows XP and not MSDE. ... the enterprise/standard versions of SQL server won't install ...
    (microsoft.public.sqlserver.msde)
  • Re: Remote connection failed
    ... If you are going over a remote connection or are not logging ... into the domain where SQL Server is then no, Windows ... authentication won't work. ...
    (microsoft.public.sqlserver.connect)
  • Re: Bizzare SQL Network Error
    ... The bizzare thing is that, the same connection string, the same code to ... In a windows APP it works fine, in a Web APP I get ... >>I am trying to connect to a default instance of SQL Server 2000 Enterprise ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ODBC to SQL Server Express?
    ... >Server connection, in both the system's ODBC connection manager and the ... >>>Can I create an ODBC connection to SQL Server Express? ... >>>Server Express and Visual Web Developer Express (for a database frontend ... I need to access the SQL Server Express databases via ODBC. ...
    (microsoft.public.data.odbc)
  • Re: Connection Error: ADO.Net and SQL Server 2005
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... I can connect to the server through an ODBC connection ... It is very puzzling because this client doesn't seem to have anything ...
    (microsoft.public.sqlserver.connect)

Loading