 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Jacobs Guest
|
Posted: Fri Jun 09, 2006 2:42 pm Post subject: BDS2006 and Fieldnames |
|
|
I am quite frankly baffled as to why a partial conversion to WideString from
AnsiString was started (but obviously not finished) on the DB.hpp file. In BCB
5 the header looks like this :-
class PASCALIMPLEMENTATION TField : public Classes::TComponent
{
..... <snip> ....
__property AnsiString FieldName = {read=FFieldName, write=SetFieldName};
..... <snip> ....
}
and in BDS2006 it is :-
class PASCALIMPLEMENTATION TField : public Classes::TComponent
{
..... <snip> ....
__property WideString FieldName = {read=FFieldName, write=SetFieldName};
..... <snip> ....
}
but the TMasterDataLink class definition further down has the FieldNames
property as an AnsiString!
I now have loads of code to convert, and it *not* simply a case of putting
WideString(...) round everything to convert what used to be an AnsiString to a
WideString, oh no. For example there is no such method as UpperCase in
WideString, so you have to change these too. This is terrible! Any comments
from anyone on this issue?
AnsiString(Table1->Fields->Fields[0]->FieldName).UpperCase() does not compile?
Why?
--
·
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk |
|
| Back to top |
|
 |
Mark Jacobs Guest
|
Posted: Fri Jun 09, 2006 5:15 pm Post subject: Re: BDS2006 and Fieldnames |
|
|
Mark Jacobs wrote:
| Quote: | AnsiString(Table1->Fields->Fields[0]->FieldName).UpperCase() does not
compile? Why?
|
Actually, it compiles fine, but this doesn't :-
AnsiString("MJ-"+Table1->Fields->Fields[0]->FieldName).UpperCase()
--
·
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk |
|
| Back to top |
|
 |
Mark Jacobs Guest
|
Posted: Tue Jun 13, 2006 5:18 pm Post subject: Re: BDS2006 and Fieldnames |
|
|
So, I assume by the silence, that there is no comment on the change from
AnsiString to WideString for fieldnames in BDS2006.
I have already mentioned 2 problems this causes (cannot use the UpperCase
method or suchlike, and cannot use + operator to concatenate strings when one
is a WideString). I need to know why you have changed to WideString, since, as
I mentioned previously, the TMasterDataLink class definition still has the
FieldNames property as an AnsiString.
This smacks of unprofessionalism. So, bump bump, answers please ...
--
·
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk |
|
| Back to top |
|
 |
Jayme Jeffman Guest
|
Posted: Thu Jun 15, 2006 11:29 pm Post subject: Re: BDS2006 and Fieldnames |
|
|
Hi,
I have never got the problems you are facing. I have never written a class
using "Pascal implementation" though.
You do not need this kind of approach when using C++Builder standard
applications.
Sometimes you need to work on another solution. I bet you can define an
AnsiString variable for containing the field name and then call the
UpperCase method. All AnsiString methods work fine on C++Builder programs.
HTH
Jayme.
"Mark Jacobs" <http://www.jacobsm.com/mjmsg?Borland%20Newsgroup> escreveu na
mensagem news:448eacf3 (AT) newsgroups (DOT) borland.com...
| Quote: | So, I assume by the silence, that there is no comment on the change from
AnsiString to WideString for fieldnames in BDS2006.
I have already mentioned 2 problems this causes (cannot use the UpperCase
method or suchlike, and cannot use + operator to concatenate strings when
one is a WideString). I need to know why you have changed to WideString,
since, as I mentioned previously, the TMasterDataLink class definition
still has the FieldNames property as an AnsiString.
This smacks of unprofessionalism. So, bump bump, answers please ...
--
·
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk
|
|
|
| Back to top |
|
 |
Mark Jacobs Guest
|
Posted: Sun Jun 18, 2006 3:34 am Post subject: Re: BDS2006 and Fieldnames |
|
|
Jayme Jeffman wrote:
| Quote: | Sometimes you need to work on another solution. I bet you can define
an AnsiString variable for containing the field name and then call the
UpperCase method. All AnsiString methods work fine on C++Builder
programs.
HTH
|
Thanks. I had to rewrite every section of code that contained a reference to
the FieldName property, so that it was encapsulated with AnsiString(...),
and then treat that instead. It took me about 3/4 of the working day.
Regards,
--
Mark Jacobs
http://jacobsm.com |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|