troubleshooting Question

Best database querying method

Avatar of FMabey
FMabeyFlag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic.NET
3 Comments1 Solution307 ViewsLast Modified:
I am currently developing a windows application using VB.NET 2005.

My question is, what is the best method of querying my SQL Server database? At present I use a mixture of:
STR_part = SQL_sectionweight.ExecuteScalar()


Dim routerow As DataRow() = DS_pltnest1.ROUTE_QUICK.Select(String.Format("ROU_PART_ID = '{0}'", STR_part))

Will I see a big benefit from using ExecuteScalar over the DataRow method if I only want to return one record?

Project Manager / Technical Lead

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

Join our community to see this answer!
Unlock 1 Answer and 3 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 1 Answer and 3 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