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

Recommended Answers

All 2 Replies

>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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.