Thursday, March 22, 2012

Can not connect to SQL 2005

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 ?
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.netHello, 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/...&DisplayLang=en
Razvan|||Hi Michael,
Welcome to use MSDN Managed Newsgroup Support. And thanks Razvans 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.|||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 ?
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net
"Wei Lu" <t-weilu@.online.microsoft.com> wrote in message
news:cXt9j%23GMGHA.128@.TK2MSFTNGXA01.phx.gbl...
> Hi Michael,
> Welcome to use MSDN Managed Newsgroup Support. And thanks Razvans 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.
>|||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.|||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.
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net
"Wei Lu" <t-weilu@.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.
>|||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.

No comments:

Post a Comment