VB.NET 2005 Connection and Data from SQL Server

Experts,

Can you please create a project that connects to SQL Server and returns data based on a SQL Query. Return the data to a datagrid or something just for viewing. Please include all actual code. Do not implment functions or error handling. I would like this to be as basic as possible, then build on it. Also, please do not use any wizards or anything that generates code because that could cause me problems.

Thanks Very Much
padgettbrianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
please have a look at http://msdn.microsoft.com/vbrun/staythepath/additionalresources/introto2005/

it is a free introduction book you can download
0
padgettbrianAuthor Commented:
thanks for the link. im having trouble with the book though, to much going on. I REALLY REALLY could just use someones help to simply all this. Code and a couple comments is what im trying to find.

0
Éric MoreauSenior .Net ConsultantCommented:
You should read chapter 4.

to get data:

Dim conn As New SqlConnection conn.ConnectionString = _
“server=(local);database=Northwind;Trusted_Connection=True"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(“SELECT * FROM Products", conn) Dim dsProducts As New DataSet
conn.Open()
adapter.Fill(dsProducts)
conn.Close()

to show data into a grid:
YourGridControlName.dataSource = dsProducts
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

padgettbrianAuthor Commented:
would you be around so if bump into a couple questions i can ask? that would be a huge help!

THANKS
0
Éric MoreauSenior .Net ConsultantCommented:
This forum could not be used as a chat room! The purpose of the forum is to ask 1 question and get some comments on it.

I also cannot promise I will be around 24/7.
0
Éric MoreauSenior .Net ConsultantCommented:
up to now, I have always commented within reasonnable delays.
0
padgettbrianAuthor Commented:
No kidding...
0
Éric MoreauSenior .Net ConsultantCommented:
and you gave me a C because of my latest comments!
0
padgettbrianAuthor Commented:
This forum could not be used as a chat room!
0
Éric MoreauSenior .Net ConsultantCommented:
Sorry for all that. I just didn't want you to use this question as a pretext for asking all kind of questions not related to the original question.
0
padgettbrianAuthor Commented:
ah ya i can see how that happens, apologies. :) and thanks for the assistance
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.