Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 18 total |
String field value '' |
Sun, Nov 18 2007 2:12 PM | Permanent Link |
"Royke" | Is it possible for a string field to have value '' (= empty string) ? Is
that not automatically converted to Null, as (I think) the BDE does? RJ |
Mon, Nov 19 2007 2:34 AM | Permanent Link |
"Harry de Boer" | Royke,
Yes, that's possible. You can test it with EDBmngr easily. Just press F2 on a field that has a NULL value in the grid, then press DELETE and voila. Regards, Harry "Royke" <royke@canada.com> schreef in bericht news:FCAB3D5C-AC70-4777-A503-917F1A037150@news.elevatesoft.com... > Is it possible for a string field to have value '' (= empty string) ? Is > that not automatically converted to Null, as (I think) the BDE does? > > RJ > > |
Mon, Nov 19 2007 3:45 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
I disagree with Harry - I think the answer is no. NULL and an empty string are treated differently (much gnashing of teeth). You'll need to create triggers to set the field from '' to NULL. Roy Lambert |
Mon, Nov 19 2007 5:16 AM | Permanent Link |
"Harry de Boer" | Roy
> I disagree with Harry Do you? >NULL and an empty string are treated differently Isn't that what I said? Regards, Harry "Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht news:FE2487C7-093A-4E0D-B4C3-365ACBA2DDB9@news.elevatesoft.com... > Royke > > > I disagree with Harry - I think the answer is no. NULL and an empty string are treated differently (much gnashing of teeth). You'll need to create triggers to set the field from '' to NULL. > > Roy Lambert > |
Mon, Nov 19 2007 6:24 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Harry
You're right. My interpretation of Royke's question was wrong. Roy Lambert |
Mon, Nov 19 2007 7:34 AM | Permanent Link |
"Harry de Boer" | Roy,
Glad you don't disagree with me anymore Harry "Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht news:7A2BBCF4-A317-4392-8C7A-0454F05322BE@news.elevatesoft.com... > Harry > > > You're right. My interpretation of Royke's question was wrong. > > Roy Lambert > |
Mon, Nov 19 2007 10:56 AM | Permanent Link |
"Royke" | Assuming that you now both agree that a string field can have value '': when
it has value 'abcd', and the user empties its DBEdit (F2, to to end, 4x BS), what is the resulting new value? '' or NULL? In more practical terms: are we now supposed to go through our whole application and replace all/most occurences of "if not field.isnull then" with "if not field.isnull and (field.asstring <> '') then" ?? Royke "Royke" <royke@canada.com> wrote in message news:FCAB3D5C-AC70-4777-A503-917F1A037150@news.elevatesoft.com... > Is it possible for a string field to have value '' (= empty string) ? Is > that not automatically converted to Null, as (I think) the BDE does? > > RJ > |
Mon, Nov 19 2007 11:56 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
What I'll be doing is creating a trigger to set any field that is '' to null - I think that will be easier overall and as far as I'm concerned the two mean the same anyway. And I DON'T CARE WHAT SQL2003 SAYS so there I'm still hopeful that Tim will build something in to allow me to loop round the fields, test their type and if VARCHAR or CHAR do the necessary - for VARCHAR RTRIM them and for both if '' set to NULL. I've been busy TMS'ing an app but I'm finally (after months and months) getting to the point of EDB'ing it. Roy Lambert |
Mon, Nov 19 2007 12:00 PM | Permanent Link |
"Jose Eduardo Helminsky" | Roy
I think the best way to change standard behavior in the TXTable and/or TXQuery, what ever value of X is inherit them and change POST method easily according your needs. You need only to change a few portion of source code and just re-compile your project. Eduardo |
Mon, Nov 19 2007 2:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Assuming that you now both agree that a string field can have value '': when it has value 'abcd', and the user empties its DBEdit (F2, to to end, 4x BS), what is the resulting new value? '' or NULL? >> The new value is a non-NULL '' (blank string). In the ElevateDB Manager, for example, you'll notice that the right-click popup menu for the data grids has an option to set a column to NULL explicitly. This is because there really is no facility for doing so in a TDBGrid. << In more practical terms: are we now supposed to go through our whole application and replace all/most occurences of "if not field.isnull then" with "if not field.isnull and (field.asstring <> '') then" ?? >> Only if you're assuming that setting a string field's value to '' will also make the field NULL like DBISAM did. For some this was an important distinction, while for others it doesn't matter. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |