Cannot connect to SQL 2000 from Visual Studio

I am a new .Net user. I am trying to use Visual Studio.net 2003 to creat a Windows application. When I try to connect to my SQL server I am getting th efollowing message

"Unable to connect to batabase. It is only possible to connect to SQL server Desktop engine database and MS Access databases with this version of Visual studio.

Someone suggested that I may not have proper security set up. i am not sure where to start checking.

Any help would be tremendoously appreciated
Thanks

Anand

[518 byte] By [Anandgb] at [2007-12-16]
# 1

try using this piece of code(for MSDE or SQL SERVER)

Dim cnnConection As SqlConnection


cnnConection =
New SqlConnection

Try


cnnConection.ConnectionString = "packet size=4096;user id=sa;data source=samitha2k\BUSINESSAIM;persist security info=False;database=master"

cnnConection.Open()

Catch exception As Exception

MessageBox.Show(exception .Message)

End Try
Here you have to provide the user id and the password provided when u installed MSDE. The datasource is the machine_name\instance name of msde.
You can get this connection sting by using the server explorer. of VS STUDIO When you right-click on the Data connections select "Add connection...". From the displayed dialod select the SQL server name from the combo.
For logging in to the SQL server select the second radio and specify the username/password for the MSDE.
Select the database you are using.
And don't forget to test the connection. If the test succeeded you can select the newly added dataconnection and see some properties displayed in the property box. Copy the connection string and remove unwanted stuff as displayed above. Then you can connect to SQL server.
Cheers

samitha at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Thanks very much Samitha.
That woked
I was using Windows authentication instead of the login to SQL

The errior message was misleading.

Thanks again

Anand

Anandgb at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Hi,

I can see how this is misleading. What it is telling you is that the Visual Studio data design tools can only talk to MSDE and Access/Jet databases with your edition of VS.NET 2003 -- this is a differientiator at the SKU level. You would need the Professional or Enterprise edition to use data tools against SQL Server.

You are always welcome to write code against ADO.NET as you see above. You just won't be able to use the tools.

We have addressed this problem with VS 2005 Standard Edition and above, so that data tools will work at that SKU level. Note that VB Express is still limited to local data only (SQL Express and Access/Jet).

I hope this clears things up.

Best,

Paul Yuknewicz
Visual Basic

PaulYuk_MS at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
I have the Visual Studio 2005 Professional version that was a raffle prize at the local kickoff installed. When I make a connection to SQL 2000 server on our net, the 'test connection' succeeds, but then the connector fails the wizard creation with "The SQL server specified by these connection properties does not support managed objects. Please choose a different server." Any ideas vs just code it?

Thanks!
Jim
Please copy reply to jamesszatkowski@hotmail.com

jamesski at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5

Hi,

In the future please create a new post for a new question. Otherwise it might get lost.

Could you clarify what you want to do? It looks like you are trying to work with SQLCLR objects. Those are only supported with SQL 2005.

If you are however just trying to work with Tables and Stored Procedures, that should work. Could you please clarify the exact steps you're trying?

thanks,
Paul

PaulYuk_MS at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...