Home All Groups Group Topic Archive Search About

Can not connect to SQL 2005

Author
11 Feb 2006 12:40 AM
Michael Tissington
I have SQL 2005 installed on a server.

The client is trying to connect to the server, I can create an ODBC
connection but when when software tries to connect using ADO I get the
following error

"To connect to this server you must use SQL Server Management Studio"


What do I need to install on the client to make this work ?


Author
11 Feb 2006 11:22 AM
Razvan Socol
Hello, Michael

Try to install (on the client computer) the "Microsoft SQL Server 2005
Backward Compatibility Components" and/or the "Microsoft SQL Server
2005 Management Objects Collection", from the following page:
http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&DisplayLang=en

Razvan
Author
13 Feb 2006 7:32 AM
Wei Lu
Hi Michael,

Welcome to use MSDN Managed Newsgroup Support. And thanks Razvan¡¯s great
help!

From your description, my understanding of this issue is: When one of your
application uses ADO to connect to the SQL Server 2005, you got the
following error message:

"To connect to this server you must use SQL Server Management Studio".

You want to know how to use ADO to connect to SQL Server 2005. If I
misunderstood your concern, please feel free to point it out.


To state this issue clearly, would your provide some information?

1.      What's your MDAC version in the client?

2.      What's the oledb provider you use to connect via ADO? Did you use
the SQLOLEDB or SQL Native Client? If you use the SQL Native Client to
connect to SQL Server 2005, does this issue occur?

SQL Native Client a data access technology that is new to Microsoft SQL
Server 2005, and it is a stand-alone data access application programming
interface (API) that is used for both OLE DB and ODBC.

To enable the usage of SQL Native Client, ADO applications will need to
implement the following keywords in their connection strings:

Provider=SQLNCLI

DataTypeCompatability=80



The following is an example of establishing an ADO connection string that
is fully enabled to work with SQL Native Client:

Dim con As New ADODB.Connection

con.ConnectionString = "Provider=SQLNCLI;" _

         & "Server=(local);" _

         & "Database=AdventureWorks;" _

         & "Integrated Security=SSPI;" _

         & "DataTypeCompatibility=80;"

con.Open


To see more information about SQL Native Client, please following this
article:

SQL Native Client Programming  
http://msdn2.microsoft.com/en-us/library/ms130892.aspx


To see how to use ADO with SQL Native Client, please following this article:

Using ADO with SQL Native Client  
http://msdn2.microsoft.com/en-us/library/ms130978.aspx


Please let me know your results with this so that I can provide further
assistance on this problem. I look forward your reply.

Sincerely yours,

Wei Lu
Microsoft Online Partner Support
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
13 Feb 2006 9:53 PM
Michael Tissington
I'm not using the SQL Native Client - the code needs to be backwards
compatible through to SQL 7 and I only want to install as little as possible
on the client.

I'm using MDAC 2.8 and SQLOLEDB

What do I need to install and still be able to use SQLOLEDB ?

Show quote
"Wei Lu" <t-we***@online.microsoft.com> wrote in message
news:cXt9j%23GMGHA.128@TK2MSFTNGXA01.phx.gbl...
> Hi Michael,
>
> Welcome to use MSDN Managed Newsgroup Support. And thanks Razvan¡¯s great
> help!
>
> From your description, my understanding of this issue is: When one of your
> application uses ADO to connect to the SQL Server 2005, you got the
> following error message:
>
> "To connect to this server you must use SQL Server Management Studio".
>
> You want to know how to use ADO to connect to SQL Server 2005. If I
> misunderstood your concern, please feel free to point it out.
>
>
> To state this issue clearly, would your provide some information?
>
> 1.      What's your MDAC version in the client?
>
> 2.      What's the oledb provider you use to connect via ADO? Did you use
> the SQLOLEDB or SQL Native Client? If you use the SQL Native Client to
> connect to SQL Server 2005, does this issue occur?
>
> SQL Native Client a data access technology that is new to Microsoft SQL
> Server 2005, and it is a stand-alone data access application programming
> interface (API) that is used for both OLE DB and ODBC.
>
> To enable the usage of SQL Native Client, ADO applications will need to
> implement the following keywords in their connection strings:
>
> Provider=SQLNCLI
>
> DataTypeCompatability=80
>
>
>
> The following is an example of establishing an ADO connection string that
> is fully enabled to work with SQL Native Client:
>
> Dim con As New ADODB.Connection
>
> con.ConnectionString = "Provider=SQLNCLI;" _
>
>         & "Server=(local);" _
>
>         & "Database=AdventureWorks;" _
>
>         & "Integrated Security=SSPI;" _
>
>         & "DataTypeCompatibility=80;"
>
> con.Open
>
>
> To see more information about SQL Native Client, please following this
> article:
>
> SQL Native Client Programming
> http://msdn2.microsoft.com/en-us/library/ms130892.aspx
>
>
> To see how to use ADO with SQL Native Client, please following this
> article:
>
> Using ADO with SQL Native Client
> http://msdn2.microsoft.com/en-us/library/ms130978.aspx
>
>
> Please let me know your results with this so that I can provide further
> assistance on this problem. I look forward your reply.
>
> Sincerely yours,
>
> Wei Lu
> Microsoft Online Partner Support
> ======================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
Author
14 Feb 2006 10:16 AM
Wei Lu
Hi Michael,

Thank you for the update.

I test the following code it works fine on client without SQL native
client installed.


Dim con As New ADODB.Connection

con.ConnectionString = "Provider=SQLOLEDB;" & "Server=<ServerName>;" &
"Database=AdventureWorks;" & "Integrated Security=SSPI;" &
"DataTypeCompatibility=80"

con.Open



If you try this on your side, dose this issue occur again?

If it appears again, would you please try this on another client computer?
Does this issue appear on other client machine?

Please let me know your result with this so that I can provide further
assistance on it. I look forward your reply.

Sincerely yours,

Wei Lu
Microsoft Online Partner Support
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
14 Feb 2006 7:38 PM
Michael Tissington
Yes, this does work .... however it is assuming you have already installed
some SQL 2005 components onto your machine ...

I'd like to know the absolute minimum that I need to install on the client
to get this to work.

Show quote
"Wei Lu" <t-we***@online.microsoft.com> wrote in message
news:xTBFB$UMGHA.3052@TK2MSFTNGXA01.phx.gbl...
> Hi Michael,
>
> Thank you for the update.
>
> I test the following code it works fine on client without SQL native
> client installed.
>
>
> Dim con As New ADODB.Connection
>
> con.ConnectionString = "Provider=SQLOLEDB;" & "Server=<ServerName>;" &
> "Database=AdventureWorks;" & "Integrated Security=SSPI;" &
> "DataTypeCompatibility=80"
>
> con.Open
>
>
>
> If you try this on your side, dose this issue occur again?
>
> If it appears again, would you please try this on another client computer?
> Does this issue appear on other client machine?
>
> Please let me know your result with this so that I can provide further
> assistance on it. I look forward your reply.
>
> Sincerely yours,
>
> Wei Lu
> Microsoft Online Partner Support
> ======================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
Author
15 Feb 2006 8:56 AM
Wei Lu
Hi Michael,

Thank you for your update.

I don't think you need to install any SQL 2005 components onto your
machine. I test the Code on a machine with Windows 2003 and Office 2003. I
didn't install any SQL 2005 components.

What is your test environment of this code?

If you use that connection code in your client, does this issue appeared?

Please let me know your results with this so that I can provide further
assistance on it. I look forward your reply.

Sincerely yours,

Wei Lu
Microsoft Online Partner Support
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button