954,206 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to connect queries from SQL Server 2005 to VB.Net Windows application

Hi,

I have a database with 15 tables and couple of queries created in SQL Server 2005 and I am making a form/interface for the database in Visual Basic .NET. I managed to connect the tables by using the BindingSource / DataGridView controls. However I cannot find the queries in the Data Set. The queries exist in the solution but I can't see them in the Data Set I used for the tables. Can I somehow connect the existing queries to the form?

Thanks,
Robert

quiptro
Newbie Poster
19 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

Go into server explorer. The queries are rather confusingly called "views" in VB.NET

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

Thanks! I deleted the queries from the Solution Explorer and rewrote them as views in the Server Explorer and after I created a new DataSet in VB.Net, I was able to access the queries just like the tables.

quiptro
Newbie Poster
19 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You