473,466 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Best practice for windows form and database access.

I am doing a project where we need to read a write data to a
database (SQL Server 2K in this case). I have seen the use of data
binding to link a property of a control to a field in a record set from
a database. It seems like this can give some benefit like being able to
easily ignore all changes and not change the current data, to push and
pull data from the database, etc... However, I'm wandering if this is
the best way to really do professional apps. It seems like this method
forces some pretty generic navigation between records. I'm concerned
about the methods of testing validity of data - especially between
multiple fields. I have not developed database applications in .NET and
barely any in VB6. My primary usage for storing and retrieving data was
from when I used to program a lot in BASIC, PASCAL, C, and so forth
where I was doing direct file access and effectively managed my own
database system per application I wrote. I had complete control over
when, how, where, and whether to store the data. I guess I'm trying to
figure out if a hybrid between these two methods is the more
appropriate - professional way, or if binding the controls to data sets
is really the best way now. Any advice is welcome - the more the
better.
Thanks in advance!

Nov 17 '05 #1
1 2563
Hi,
I am doing a project where we need to read a write data to a
database (SQL Server 2K in this case). I have seen the use of data
binding to link a property of a control to a field in a record set
from a database. It seems like this can give some benefit like being
able to easily ignore all changes and not change the current data, to
push and pull data from the database, etc... However, I'm wandering
if this is the best way to really do professional apps.
IMHO: Definitely NO!

It seems like this method forces some pretty generic navigation between records.
I'm concerned about the methods of testing validity of data -
especially between multiple fields. I have not developed database
applications in .NET and barely any in VB6. My primary usage for
storing and retrieving data was from when I used to program a lot in
BASIC, PASCAL, C, and so forth where I was doing direct file access
and effectively managed my own database system per application I
wrote. I had complete control over when, how, where, and whether to
store the data. I guess I'm trying to figure out if a hybrid between
these two methods is the more appropriate - professional way, or if
binding the controls to data sets is really the best way now. Any
advice is welcome - the more the better.
Databinding seems to be a nice feature. However, if you want to write a big
application, you usually divide it in Layers (like Datalayer, Presentation
Layer, Business Layer), which is the best way to build a scalable App (just
my opinion). With DataBinding however you "jump" over the Business Layer,
which means you bind your Presentation directly to the Database. This will
lead you to problems ... In my humble opinion, DataBinding in most cases
should not be used ...

Regards,

Frank Eller
www.frankeller.de

Thanks in advance!

Nov 17 '05 #2

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

Similar topics

2
by: Joe Bloggs | last post by:
I have a general question on best practice regarding data access. I have the code below, a static method defined in a class that I use in a data layer dll. The method takes a string as its...
17
by: | last post by:
I have an app that retrieves data from an Access database. At the moment I have the SQL string as a Const in my app. I understand this is not best practice. I don't want the user to have access to...
4
by: RS | last post by:
Hello All, Does anyone know what the best practice is for updating database schema? We are designing a smart client application where the .Net application is used online and offline. If the...
1
by: MichaelG | last post by:
I have a web service that talks to SQL Server 2005. At present the WS uses an SQL Server login and password to connect. Is this best practice or should I be running the WS under a domain account...
3
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links...
2
by: Ronald S. Cook | last post by:
What is the best way to structure my Windows form so that when it is dragged bigger (i.e. maximized) or smaller, the controls will reorganize themselves "properly"? Assume I have 4 logical...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
1
by: TerryStone | last post by:
I am writing a Windows application, with an SQL Server (Express) database. The application is single user. The Windows application is the only application that accesses the database. I have...
2
by: RONIN | last post by:
Can you tell me what is the best practice for SQL database migration from one DB server, to another one, new DB server. The old DB server will be removed. 1. Backup from old and restore all...
13
by: G | last post by:
Hello, Looking for opinions on a fairly simple task, new to ASP.net (C#) and want to make sure I do this as efficiently as possible. I have a web based form, and I need to run some SQL before...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.