troubleshooting Question

Simple DataGridView Question - Passing Variables

Avatar of clebo99
clebo99 asked on
Visual Basic.NET
4 Comments2 Solutions313 ViewsLast Modified:
I'm a semi competent VB6 programmer trying to understand .Net 2005.  This is what I am trying to do:

- I have a form that has information in a datagridview that is a very simple SELECT statement for a very simple DB.
- I have configured the form so if I click on the cell, the value is placed into a public variable configured in a module.
- I want to use that variable in the WHERE statement in another Datagridview on a different form.

From what I am understanding, using datagridview limits you to direct SQL.  In the past in VB6, I would create my ADODB connections in the code.  Open the DB using a Function, create a string using the & to add my variable after the WHERE like below:

 str = "SELECT * from Approved WHERE PatchNum = '" & varname & "'"

So, how do I do this?  In the past, Ive used LISTVIEWs in VB6 and have been easily retrieved data in DBs.  I just cannot believe that doing the simple DB manipulations in VB6 are this complicated in .Net 2005.  

What am I missing?  Does my question make sense?  

Chris, Baltmore.
Software Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros