Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 17 total |
2.06 Build 2 - Access Violation TEDBQuery in 64-bit |
Fri, Dec 2 2011 5:27 AM | Permanent Link |
Jose Pascoa | In the Tutorial database (Unicode, not tested in Ansi) I added a column Sales, Type Float Opened the Customer table and added another row and filled values for Sales. Added in the form a TEDBQuery, TDBEDit, a DataSource2 and a TButton. (But problem appears also without TDBEDit and DataSource2) Procedure below runs OK in 32-bit, Access Violation C0000005 in 64-bit And same problem if field type is Integer instead of Float Same problem if SQL is inserted directly in the TEDBQuery component procedure TForm3.btCalcSalesClick(Sender: TObject); var auxSql : string; begin With EDBQuery1 do begin SQL.clear; SQL.Add ('SELECT Sum(Sales) AS SumOfValues'); SQL.Add ('FROM Customer'); Open; end; end; Any idea, JP |
Mon, Dec 5 2011 6:30 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << In the Tutorial database (Unicode, not tested in Ansi) I added a column Sales, Type Float Opened the Customer table and added another row and filled values for Sales. Added in the form a TEDBQuery, TDBEDit, a DataSource2 and a TButton. (But problem appears also without TDBEDit and DataSource2) >> Can you email me this table (support@elevatesoft.com) ? It's usually best that I use the exact same table that is causing the issue. Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 5 2011 8:59 AM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 06:30:56 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: > ><< In the Tutorial database (Unicode, not tested in Ansi) I added a column >Sales, Type Float Opened the Customer table and added another row and filled >values for Sales. Added in the form a TEDBQuery, TDBEDit, a DataSource2 and >a TButton. (But problem appears also without TDBEDit and DataSource2) >> > >Can you email me this table (support@elevatesoft.com) ? It's usually best >that I use the exact same table that is causing the issue. > >Thanks, Hi TIm, I prefer not to send by email because I am not experienced with ElevatedDB and don't know what I need to send to make it work on another machine. But the reverse enginner script is below. If is not enough I will try to make a complete example. The problem appears when running the query I mentioned earlier. I was converting an application I have from DBISam to ElevateDB and found a problem with a query in 64-bit XE2 on application startup. Tried a similar query with the Tutorial database and the problem is still there. /************************************************************ * * ElevateDB Reverse-Engineered script for the * Tutorial database * * Generated on 05-Dec-11 1:47:36 PM * By the user Administrator * ************************************************************/ SCRIPT BEGIN /************************************************************ * Tables ************************************************************/ EXECUTE IMMEDIATE 'CREATE TABLE "Customer" ( "ID" INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1), "Name" VARCHAR(30) COLLATE "UNI_CI" NOT NULL, "Address1" VARCHAR(40) COLLATE "UNI_CI", "Address2" VARCHAR(40) COLLATE "UNI_CI", "City" VARCHAR(30) COLLATE "UNI_CI", "State" CHAR(2) COLLATE "UNI_CI", "Zip" CHAR(10) COLLATE "UNI_CI", "CreatedOn" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "Sales" FLOAT ) VERSION 1.00 READWRITE UNENCRYPTED INDEX PAGE SIZE 8192 BLOB BLOCK SIZE 1024 PUBLISH BLOCK SIZE 1024 PUBLISH COMPRESSION 0 MAX ROW BUFFER SIZE 32768 MAX INDEX BUFFER SIZE 65536 MAX BLOB BUFFER SIZE 32768 MAX PUBLISH BUFFER SIZE 32768'; /************************************************************ * Table Rows ************************************************************/ /************************************************************ * Views ************************************************************/ /************************************************************ * Functions ************************************************************/ /************************************************************ * Procedures ************************************************************/ /************************************************************ * Table triggers, indexes, and constraints ************************************************************/ -- Creating non-foreign key constraints for Customer table EXECUTE IMMEDIATE 'ALTER TABLE "Customer" ADD CONSTRAINT "ID_PrimaryKey" PRIMARY KEY ("ID")'; END /************************************************************ * End of generated SQL ************************************************************/ |
Mon, Dec 5 2011 4:16 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jose,
<< But the reverse enginner script is below. >> I'm trying the same thing here, but I can't reproduce what you're seeing. As far as what I need in terms of EDB files - I would simply need the edbdatabase.edbcat file, and all of the table files (Customer.*) that are in the database directory. I would appreciate it if you could send me the table with your data. Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 5 2011 4:57 PM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 16:16:12 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: >Jose, >As far as what I need in terms of EDB files - I would simply need the >edbdatabase.edbcat file, and all of the table files (Customer.*) that are in >the database directory. I would appreciate it if you could send me the >table with your data. > >Thanks, Hi Tm, I just sent, hope it helps. As I said the error is only when compiled in 64-bit. JP |
Mon, Dec 5 2011 5:27 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jose,
<< I just sent, hope it helps. As I said the error is only when compiled in 64-bit. >> Thanks, got it. Unfortunately, though, I tried it here and it worked fine. Either I'm forgetting about a fix that was done since 2.06 B2 (I've double-checked several times on this) or you're not compiling with 2.06 B2. That's about the only explanations I can come up with. I've tried with range-checking on, etc. to make sure that there isn't something slipping by, but no AV. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 6 2011 7:00 AM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 17:27:28 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: >Jose, > ><< I just sent, hope it helps. As I said the error is only when compiled in >64-bit. >> > >Thanks, got it. Unfortunately, though, I tried it here and it worked fine. >Either I'm forgetting about a fix that was done since 2.06 B2 (I've >double-checked several times on this) or you're not compiling with 2.06 B2. >That's about the only explanations I can come up with. I've tried with >range-checking on, etc. to make sure that there isn't something slipping by, >but no AV. Tim, I am using 2.06 B2 and tried on 2 different OSs in 64-bit. I will wait for 2.06 B3 and will see JP |
Tue, Dec 6 2011 11:27 AM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 17:27:28 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: >Jose, >range-checking on, etc. to make sure that there isn't something slipping by, >but no AV. You need to remove the ASM from edbcommon.pas in 64-bit. That asm is completely wrong in 64-bit. I am 95% (smile) this is the exact reason for the issue. JP |
Tue, Dec 6 2011 12:14 PM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 17:27:28 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: That asm is good for the Borland Fastcall where first 3 parameters are passed in the registers eax, edx and ecx, but 64-bit is completely different. In 64-bit there is only 1 calling convention and first 4 parameters ae passed in registers RCX, RDX, R8 and R9. There are a few other things to watch in 64-bit, I made an article for Codeproject about Xe2 and BASM, which is also in my website. This is why I told you to remove the whole ASM for 64-bit because it is completely wrong. JP |
Tue, Dec 6 2011 12:56 PM | Permanent Link |
Jose Pascoa | On Mon, 5 Dec 2011 17:27:28 -0500, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote: >Jose, I tested and it fixed the problem to replace the ASM with the existing Interlocked*.* functions for FPC. There is some more asm at edmigrate.pas which is also not suitable for 64-bit, but i have not stumbled on that... yet. |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |