πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #476

Re: TabControls & Saving to a Database

#476
From: Ray G
Date: Tue, 28 Dec 2004 11:00
48 lines
2341 bytes
Hi Joanna

Thanks for your reply..

I am not using dataware components..

On the form load I am using TextBox1.DataBindings.Add("Text", ds,
"master.fieldname); to populate the edit boxes on various tab pages...

I am creating the connection, dataset and doing the binding via code and not
via components...

Is this the wrong way of doing things.


Thanks
Ray



"Joanna Carter (TeamB)" <joanna@nospam.co.uk> wrote in message 
news:41d12c6e@newsgroups.borland.com...
> "RayG" <ray@mweb.co.za> a οΏ½crit dans le message de news:
> 41d11e3f$1@newsgroups.borland.com...
>
>> Is there anyway that this can be changed or should I loop through the tab
>> pages and set tabcontrols.SelectedTab each page to initialise the data...
>
> The problem is not with the data-aware controls, which IMO are badly
> designed anyway; the real answer is to separate the logic that does the
> creating of the SQL from the UI.
>
> When you create a new record in the dataset, many of the fields are set to
> null rahter than default values. Why don't you cycle through the dataset
> before the edits are shown and set the default values in code ? Then,
> whether the edits are used or not, the fields are already primed 
> correctly.
>
> Joanna
>
> --
> Joanna Carter (TeamB)
>
> Consultant Software Engineer
> TeamBUG support for UK-BUG
> TeamMM support for ModelMaker
>
> 
Technical Details
Message-ID: <41d13cb7@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41d11e3f$1@newsgroups.borland.com> <41d12c6e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,507a33c483242503
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII
From: "Ray G" <firstname@mweb.co.za>
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <41d11e3f$1@newsgroups.borland.com> <41d12c6e@newsgroups.borland.com>
Subject: Re: TabControls & Saving to a Database
Date: Tue, 28 Dec 2004 13:00:19 +0200
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 196.2.155.76
Message-ID: <41d13cb7@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104231607 196.2.155.76 (28 Dec 2004 03:00:07 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail