473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

'Proper' way to databind?

Hi I'm using a variety of sources to learn to databind my db to my
forms.

Does it make any difference if I 'drag' out an sqlDataAdapter and
Dataset?

Or

Should I put it within the VB code?

The books and videos I'm watching show the 'drag' method, while the
Microsoft samples all use the binding from within their VB.

What gives?

Thanks,
Sparkle
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 20 '05 #1
2 919
Cor
Hi Sparkle,

I think a matter of taste, when you drag them, you get a special dataset
class, with that you can use the dataset nicer. But it limits you after a
while but you can only do what the wizard do, and it build much more than
you probably needs.

When you build them yourself by code you can make your own database classes
which you can make more tailored on your purposes

I do not use the wizard and as I have seen almost nobody who is regular to
this dotnet newsgroups.

You can sometimes use them to make difficult SQL strings and than cut and
paste them in your program.

In my opinion is also a usefull tool the XSD and the XML builder but for me
without to generate a dataset class.

Just my thoughts,

Cor
Hi I'm using a variety of sources to learn to databind my db to my
forms.

Does it make any difference if I 'drag' out an sqlDataAdapter and
Dataset?

Nov 20 '05 #2
Sparkle,
As Cor stated its a matter of taste, and I'll add project requirements.

I use both depending on the size & requirements of the project.

I only drag to the form itself in the most simply of projects, instead I
will drag to a new Component (Project - Add Component) where the Component
is my DataGateway or DAL (Data Access Layer). If project requirements don't
lend themselves to a visual Data Component, then I code the data components
by hand. In both cases I normally add code manually to better encapsulate
the data components on my component.

To me the visual designers enable you to define & set properties quicker.

Hope this helps
Jay

"sparkle" <hr****@hra.co.santa-cruz.ca-dot-us.no-spam.invalid> wrote in
message news:40**********@Usenet.com...
Hi I'm using a variety of sources to learn to databind my db to my
forms.

Does it make any difference if I 'drag' out an sqlDataAdapter and
Dataset?

Or

Should I put it within the VB code?

The books and videos I'm watching show the 'drag' method, while the
Microsoft samples all use the binding from within their VB.

What gives?

Thanks,
Sparkle

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: autofill | last post by:
2 scenario inside a WebUserControl. I want to know why Microsoft and so many book doesn't suggest us to work like that. This control going to be in my page and I will call the DataBind of my...
3
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the...
1
by: Martin | last post by:
Hi, I've got a web label control which I set a databind expression on the Text attribute in the html for the page (aspx file). At runtime, I want to override this attribute, so before I do...
2
by: Jim Bancroft | last post by:
Hi everyone, I have a DropDownList I populate as outlined below. This is from my code-behind file: private void Page_Load(object sender, System.EventArgs e) { BindMyData(); DataBind(); }
3
by: Luis Esteban Valencia | last post by:
Hi, the following code displays a search result in a datagrid and is working without problems. But I think the way I have done is not correct especially databind(). could anyone help me to...
0
by: nicklang | last post by:
Say you are creating a page which contains a child control which uses a DataList or DataGrid control. In a DataList, the rows are dynamic controls and are data bound, so you have to first load the...
2
by: RSH | last post by:
I am trying really hard to grasp the concept of Interfaces and their real world usage. I constructed a simple project of a webpage that contains two controls. I am enabling communication back...
1
by: Brian Simmons | last post by:
I'll try to keep this short & sweet and hopefully get the direction I'm looking for. I'll drop a SqlDatasource onto a webform. Configure it to use a stored proc, perhaps have the parameters be...
8
by: =?Utf-8?B?QmVu?= | last post by:
Hi, I have a couple of questions about the proper design of classes. I'll use a simple Customer class for my question. 1) Lets say that I have this Customer class like I said, and I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.