Wrox Programmer Forums
|
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2012, 02:02 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default The DataGridView

Is there any advantage to filling the DataGridView using SQL as opposed to using as opposed to using the data source in Visual Basic?

Milt
 
Old February 28th, 2012, 04:53 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I'm not completely sure what you mean by using SQL vs a data source. usually there will be a data source whether you query it using SQL or not.

You might be wondering about querying for data at run time and binding the control at design time. If that's the case, then there are a few differences. You can compose the query at run time if you don't bind at design time. Although you can probably also change the query used to select data for binding.

In the past, Microsoft has frequently changed the way the bound data objects work. that hasn't happened in a while but when it does, it's often easier to update a program for a new version if you're doing everything in code rather than through bindings.

When push comes to shove, however, it's often a question of personal preference, what you're more comfortable with, and what is easier to understand.

(Unless I misunderstood the question.)
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old February 28th, 2012, 05:09 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default DataGridView

Rod, Thanks for the response to my poorly worded question, but...you did answer my question. In my program, the DataGridView was set up in code, I think I'll leave it that way.

Milt
 
Old February 28th, 2012, 07:19 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

No need to fix it if it already works

I often make examples that do as much as possible in the code because it's easier to see than a long series of steps in the IDE.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)





Similar Threads
Thread Thread Starter Forum Replies Last Post
datagridview help manius VB Databases Basics 1 January 27th, 2008 02:44 AM
DatagridView in C# velan C# 2005 0 June 8th, 2007 09:25 PM
datagridview thirumalai ASP.NET 1.0 and 1.1 Professional 1 April 7th, 2007 03:35 AM
Need Help with datagridview maximus101 VB Databases Basics 2 September 19th, 2006 10:49 AM
datagridview ScottSheck Visual Basic 2005 Basics 0 June 14th, 2006 11:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.