Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 10 total |
Proting DBSIAM 3 to Unicode Delphi Versions |
Thu, Jan 5 2012 10:03 AM | Permanent Link |
Rolf Frei eicom GmbH | I have proted DBISAM 3 to Delphi 2009 and up, but there is one single place
in the source, where I don't exactly know how to port that: In DBSIAMTb.pas is this routine: procedure GetParamData(Param: TParam; Buffer: Pointer); var s: AnsiString; begin with Param do begin if (DataType in [ftBlob..ftTypedBinary]) or ((DataType in [ftString,ftFixedChar]) and (Length(VarToStr(Value)) > MAX_FIELD_SIZE)) then begin with TQueryBlobParam(Buffer^) do begin BlobBuffer:=PChar(VarToStr(Value)); BlobLength:=Length(VarToStr(Value)); end; end else begin GetData(Buffer); if (DataType in [ftWideString,ftFixedWideChar]) then begin s := AnsiString(PChar(Buffer)); StrCopy(PAnsiChar(Buffer), PAnsiChar(S)); end; end; end; end; The unknown part are this lines: BlobBuffer:=PChar(VarToStr(Value)); BlobLength:=Length(VarToStr(Value)); I have tried somthing like that, but I don't think it is correct, as VarToStr returns a Unicode string: BlobBuffer:=TRecordBuffer(PAnsiChar(AnsiString(VarToStr(Value)))); BlobLength:=Length(VarToStr(Value)); How must I change this part of code to work correct? How can I get the correct BlobBuffer and BlobLength? Regards Rolf |
Tue, Jan 10 2012 4:34 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Rolf,
<< I have tried somthing like that, but I don't think it is correct, as VarToStr returns a Unicode string: >> It's fine as long as you cast the Unicode string to an AnsiString. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 11 2012 2:51 AM | Permanent Link |
Soft-Team Soft-Team I/S | Having a DBISAM 3 running under XE2 would be a dream!
Porting +100 apps to XE2 AND changing the database as well i a huge task, so I will make the transition by starting compiling some of the apps in XE2, and when everything is there: move to DBISAM 4 So: Where can I get it?? Regards Niels Fleckenstein Soft-Team.dk |
Wed, Apr 11 2012 3:26 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Soft-Team
You ask Tim if you can buy the source and then you compile that in XE2 debugging as you go. When that's done you're in business. From Rolf's post about porting to D2009 it shouldn't be to hard. Roy Lambert |
Wed, Apr 11 2012 9:21 AM | Permanent Link |
Soft-Team Soft-Team I/S | Well I already have the source... (both for DBISAM 3 and 4)
But the (tested) changes to compile it in XE2 would be greatly appriciated... |
Wed, Apr 11 2012 1:56 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << Well I already have the source... (both for DBISAM 3 and 4) But the (tested) changes to compile it in XE2 would be greatly appriciated... >> It's not a simple list of changes - there are quite a few changes for both Unicode and 64-bit in DBISAM 4.x -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 18 2012 7:01 AM | Permanent Link |
Soft-Team Soft-Team I/S | Tnx Tim,
I know its not a small list of changes, but if someone else already have done it - it would be "nice to have"... (to do it "on my own" would take half a day out of my calender) And if Tim is just sitting on it... (give him a gentle push, and mail me "the magic" - and I will spend that half day with my family instead of coding) Best regards Niels Soft-Team |
Tue, Apr 24 2012 10:17 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Niels,
<< And if Tim is just sitting on it... (give him a gentle push, and mail me "the magic" - and I will spend that half day with my family instead of coding) >> I have not ported DBISAM 3 to XE2, so such a list of changes does not exist. I don't even have such a list for DBISAM 4 - the changes were simply made, as necessary, to get things to work. To get such a list one would have to run a diff tool on the pre-XE2 DBISAM 4 code and the post-XE2 DBISAM 4 code. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 25 2012 4:34 AM | Permanent Link |
Soft-Team Soft-Team I/S | It should have read:
And if _Rolf_ is just sitting on it... (give him a gentle push, and mail me "the magic" - and I will spend that half day with my family instead of coding) |
Thu, Apr 26 2012 9:32 AM | Permanent Link |
Rolf Frei eicom GmbH | See your email. As Tim already stated there is no simple list of changes as
it wasn't that simple. The full conversion with intense testing and elimation of all warnings and hints and make it to work with unicode strings in the interfaces (I didn't make a simple String to ansistring conversion), toke me about 80 hours of work. One of the more complicatet part was the paramater stuff from my initial message here. In my final version I have it changed that code to this: with TQueryBlobParam(Buffer^) do begin BlobLength := GetDataSize; SetLength(AnsiString(BlobBuffer), BlobLength); GetData(BlobBuffer); if (DataType in [ftWideString,ftFixedWideChar]) then begin s := AnsiString(PChar(BlobBuffer)); StrCopy(PAnsiChar(BlobBuffer), PAnsiChar(s)); BlobLength := Length(s); SetLength(AnsiString(BlobBuffer), BlobLength); end; end; If you use the C/S Version alle data transmissions from Client to Server and back must also be converted. Then many PChars must be changed to TRecordBuffer, and much more. The list is to large to post here, as I don't realy have a complete list. Regards Rolf "Soft-Team" schrieb im Newsbeitrag news:E62F780C-F0D1-4500-A351-E0463A9E781C@news.elevatesoft.com... It should have read: And if _Rolf_ is just sitting on it... (give him a gentle push, and mail me "the magic" - and I will spend that half day with my family instead of coding) |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |