force TStringField instead TWideStringField

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
carlonarcisi
Posts: 29
Joined: Fri 10 Dec 2010 15:07

force TStringField instead TWideStringField

Post by carlonarcisi » Fri 17 Aug 2012 07:41

hello
I'm using Delphi XE2, last relese unidac 4.3.8
when I connect to a tables in a MS Access (access 2000 format) DB, when I add fields in fields editor all fields that are type TEXT are interpreted as TWideStringField.
I have the same DB on MSSQL and when I connect to the same table where the fields are varchar, the fields are interpreted as TStringField.
I tried to configure the dataTypeMap but I could not set it up to solve the problem .. or not this is the way.
i've tryed to set param "useUnicode" = FALSE in specificOptions in UniConnection .. but .. nothing

I understand that varchar does not support unicode for this reason is converted to TStringField that just does not support unicode.

This is why I was hoping to linking up with UseUnicode = FALSE in ACCESS options the fields would be converted into TStringField

the nice thing, If I connect to access database using D7 with unidac 4.2.7 fields are interpreted as TStringField and not as TWideStringField.

can you give some indication?
carlo narcisi

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: force TStringField instead TWideStringField

Post by AlexP » Mon 20 Aug 2012 11:42

hello,

Thank you for the information. We've reproduced and fixed the problem. This fix will be included in the next build.
For the time being, you can use Data Type Mapping specifying the DB field name instead of its type, you'll get the correct result in this case.

carlonarcisi
Posts: 29
Joined: Fri 10 Dec 2010 15:07

Re: force TStringField instead TWideStringField

Post by carlonarcisi » Mon 20 Aug 2012 12:08

hi alex
i've 327 unit i've to convert and check .. and I'd rather do the job once and do it right
please, how is possible download the beta release ?
let me know

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: force TStringField instead TWideStringField

Post by AlexP » Mon 20 Aug 2012 13:45

hello,

Please specify your license number and e-mail, in order that we can send you the fixed version of UniDAC for XE2

carlonarcisi
Posts: 29
Joined: Fri 10 Dec 2010 15:07

Re: force TStringField instead TWideStringField

Post by carlonarcisi » Mon 20 Aug 2012 14:02

thanks a lot !!!
license number is 02005.
carlo.narcisi*gmail*com

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: force TStringField instead TWideStringField

Post by AlexP » Tue 21 Aug 2012 13:14

hello,

I send you a fixed AccessDataTypeMapUni unit to the specified e-mail

carlonarcisi
Posts: 29
Joined: Fri 10 Dec 2010 15:07

Re: force TStringField instead TWideStringField

Post by carlonarcisi » Wed 22 Aug 2012 08:47

hello alex
I replaced the unit that you gave me and I compiled all, but I get exactly the same results.
when I connect a string field is converted into TWideStringField and not TStringField
can you help me ?
carlo

carlonarcisi
Posts: 29
Joined: Fri 10 Dec 2010 15:07

Re: force TStringField instead TWideStringField

Post by carlonarcisi » Wed 22 Aug 2012 09:08

works!
did not tell me .. I write for other users

I added the following line on data type mapping:
database type: Text
Field Type: string

carlo

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: force TStringField instead TWideStringField

Post by AlexP » Wed 22 Aug 2012 09:55

hello,

The field type doesn't change by default, however, now, when using DataTypeMapping, Text type fields can be mapped to the TStringField type in Delphi versions since 2009. To map Text fields to a needed type, you can set mapping globally at the TUniConnection level, and the set rule will be applied to all attached DataSets

Post Reply