0

I am having trouble connecting to a sql database.

I have vb.net and it came with vs 03. I have doen a varity of simple programs with vb. I have recently added a server with sql 08 and connected with a workgroup.
When I use vs to put a sql connection into a form a prompt comes up for the connection. I enter the server, username, password and database. I click on the test connection button and get the message "Test Connection Succeeded". However, when I click on the 'OK' button I get the message "Unable to connect to database. It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access databases with this version of Visual Studio."

Is it possible to use vb.net 03 to access SQL 2008? Can I hard code the connection into a vb.net form? Do I need to only upgrade Visual Studio or should I switch to C# or C++ ?

Thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dbart
0

>I am having trouble connecting to a sql database.

Firstly, learn the ADO.NET class library.

>Is it possible to use vb.net 03 to access SQL 2008?

SqlClient provider (database integration lib) exposes the functionality of MS-SQL server version 7.0 or later.

>Can I hard code the connection into a vb.net form?

Yes.

0

Thanks, it took a while to researchADO.net. But I found a website with a good example to follow.
I can now access my SQL 08 with VB.net

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.