Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
Conversion from DBISAM3 To ElvateDB - ACE Reporter problem |
Tue, Feb 4 2014 10:27 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Hi
Not sure if my problem relates to ACE Reporter (v2.05) or to the migration from DBISAM3 to ElevateDB (v2.14 B2) or neither! In DBISAM3 I have a field defined like this:- "TransMemo" MEMO, I ran the migrator and it redefined the field as:- "TransMemo" CLOB COLLATE "UNI", The data looks correct in EDBMgr and my application displays it correctly in TDBMemos. BUT in my ACE Reports only the first character of the field is displayed. The field in one of the many reports looks like this in the .DFM:- object tenantheldrptqueryTransMemoVar: TSctDBVar [20] Left = 311 Top = -130 Width = 0 Height = 0 DataField = 'TransMemo' DataSource = TenantHeldRptQueryDS UpdateLevel = DetailBandlevel AutoVar = False ID = vidAutoDataVar end and the print variable looks like this:- object TransMemo: TSctvarlabel Left = 202 Top = 0 Width = 520 Height = 17 WrapText = True Stretch = True Variable = tenantheldrptqueryTransMemoVar end The report is the result of an SQL Query (code posted below my sig) - but this is unchanged between versions and contains nothing fancy. Any suggestions as to what might be the problem? Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz ================================== SELECT IF((NOT T.VacateDate IS NULL) AND (T.VacateDate <= CURRENT_DATE) THEN 'Vacated Tenants' ELSE 'Current Tenants') AS TenantGroup, T.SortKey, T.TenantCode, T.VacateDate, -TT.Held AS Held, TT.TransDate, TT.TransNo, TT.TransType, TT.TransSeq, TT.TransText, TT.TransMemo, TT.Period, TT.Sequence, P.Managed, P.PropertyCode, P.StreetNumber, P.StreetName, P.Suburb FROM Tenants T JOIN TenantTrans TT ON T.TenantCode = TT.TenantCode JOIN Properties P ON T.PropertyCode = P.PropertyCode LEFT OUTER JOIN Portfolios Pf ON Pf.PortfolioCode = P.PortfolioCode LEFT OUTER JOIN PropertyManagers M ON M.PMCode = Pf.PMCode WHERE TT.Period >= 1 AND TT.Period <= 500 ORDER BY T.SortKey, TT.Period, TT.TransDate, TT.TransNo -------------------------------------------------------------- |
Tue, Feb 4 2014 11:28 PM | Permanent Link |
Barry | Jeff,
I'm not familiar with Ace Reporter so I can only comment on the obvious. When you execute the query in EDBMgr: SELECT IF((NOT T.VacateDate IS NULL) AND (T.VacateDate <= CURRENT_DATE) THEN 'Vacated Tenants' ELSE 'Current Tenants') AS TenantGroup, T.SortKey, T.TenantCode, T.VacateDate, -TT.Held AS Held, TT.TransDate, TT.TransNo, TT.TransType, TT.TransSeq, TT.TransText, TT.TransMemo, TT.Period, TT.Sequence, P.Managed, P.PropertyCode, P.StreetNumber, P.StreetName, P.Suburb FROM Tenants T JOIN TenantTrans TT ON T.TenantCode = TT.TenantCode JOIN Properties P ON T.PropertyCode = P.PropertyCode LEFT OUTER JOIN Portfolios Pf ON Pf.PortfolioCode = P.PortfolioCode LEFT OUTER JOIN PropertyManagers M ON M.PMCode = Pf.PMCode WHERE TT.Period >= 1 AND TT.Period <= 500 ORDER BY T.SortKey, TT.Period, TT.TransDate, TT.TransNo 1) Do you see the full contents of the CLOB field? (Double click on the field in the results pane and a window pops up). 2) For "object tenantheldrptqueryTransMemoVar: TSctDBVar [20] " What happens when you edit the Form as text and change it from: Top = -130 Width = 0 Height = 0 to: Top = 0 Width = 520 Height = 17 ? Barry |
Wed, Feb 5 2014 6:23 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< BUT in my ACE Reports only the first character of the field is displayed. >> The most likely explanation is that the ACE Reporter version that you're using doesn't support Unicode strings. You'll get the same thing if you try to use a Unicode CLOB with a version like Delphi 7 and its TMemo (using 2.15). The NULL leading bytes in the Unicode string's 2-byte character pairs for characters <= #255 cause the problem. Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 6 2014 3:17 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Thanks Barry and Tim
I have just heard back from Steve Tyrakowski, the ACE Reporter guy and he says:- "The single character issue is suspiciously pointing to Unicode where the second zero byte is seen as a string terminator. We need to determine if the issue is with the libraries or with the conversion process. If you are able to reproduce the issue with a simple app, please send us the PAS and DFM and a small copy of the table with just a few records." .... so I'll get a demo organised for them. Sounds like Tim and Steve are on the same page. Apologies for the delay in answering - public holiday yesterday (Waitangi Day). Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz |
Sun, Feb 9 2014 9:44 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Hi
This article needs a new title as I has proved it not to be an ACE Reporter problem - just a "me" problem yet to be solved. I should have seen it sooner, but I now see that many but not all TDBMemo's in the application are also truncating the display at "one character". I have found that if I change the Blob Type to ftWideMemo, then the truncated memos display correctly BUT not all fields need to be changed to display correctly. For some reason ftMemo works OK with some fields and not with others even though the Migrator has changed all the fields to CLOB. Moreover, this little bit of code (that has been working for 15 years since BDE!) now doesn't work:- ---------------------------------------------------- slWarning.Text := apmDM.LandlordLookUpInternalComment.AsString; mainStatusBar.SimpleText := 'WARNING - '; if slWarning.Count > 0 then mainStatusBar.SimpleText := mainStatusBar.SimpleText + slWarning[0]; --------------------------------------------------- where slWarning is a TStringList. I find that apmDM.LandlordLookUpInternalComment.AsString is returning 'C'#0'l'#0'i'#0'c'#0'k'#0' '#0't'#0'h'#0'e'#0' '#0'D'#0'e'#0't'#0'a'#0'i'#0'l'#0's'#0' '#0'b'#0'u'#0't'#0't'#0'o'#0'n'#0' '#0'f'#0'o'#0'r'#0' '#0't'#0'h'#0'e'#0' '#0'p'#0'u'#0'r'#0'p'#0'o'#0's'#0'e'#0' '#0'o'#0'f'#0' '#0't'#0'h'#0'i'#0's'#0' etc.etc. Instead of 'Click the Details button for the purpose of this account ... etc. etc.' I get the same result with .AsWideString. So I'm likely to have problems lurking in code that doesn't lead to an obvious display problem. Bearing in mind that this is a Unicode db, can I safely do a mass change of ftMemo to ftWideMemo to eliminate some of my problems? (I have 117 occurrences of ftMemo in 62 .DFM files) Cheers Jeff |
Mon, Feb 10 2014 9:09 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< I have found that if I change the Blob Type to ftWideMemo, then the truncated memos display correctly BUT not all fields need to be changed to display correctly. >> They should if you're trying to load Unicode characters into them. All "English" Unicode characters (< #255) are going to have a leading #0 byte. << For some reason ftMemo works OK with some fields and not with others even though the Migrator has changed all the fields to CLOB. >> ftMemo, as opposed to what ? << Moreover, this little bit of code (that has been working for 15 years since BDE!) now doesn't work:- >> What type of field (TFieldType) is the apmDM.LandlordLookUpInternalComment field using ? It should be ftWideString, not ftString. ftString is an AnsiString type, and won't work properly for Unicode databases. << Bearing in mind that this is a Unicode db, can I safely do a mass change of ftMemo to ftWideMemo to eliminate some of my problems? (I have 117 occurrences of ftMemo in 62 .DFM files) >> Yes, but you need to also do a mass change of ftString to ftWideString, and the same for ftFixedChar to ftFixedWideChar. Am I correct that you took a DBISAM 3 database (which uses 100% AnsiStrings) and migrated it to a *Unicode* ElevateDB database and expected your existing code to work exactly the same ? If so, then that is not an accurate expectation. Tim Young Elevate Software www.elevatesoft.com |
Mon, Feb 10 2014 7:43 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Thanks Tim for your comments.
I have sorted out most of the problems with my mass changes to "Wide" field types. My remaining problem I will post under a new Subject" as the reference to ACE is now redundant. Cheers Jeff |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |