Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 9 of 9 total |
Date problem |
Thu, Jul 15 2021 12:36 PM | Permanent Link |
Michael Saunders | I have an EDB table that includes a Date field that can be null and am trying to insert a new record into the table from a server program but get the error Status code 500 every time I try to Commit
What is wrong with this TestTable.Columns['Date'].asdatetime := Date; Also how do I set the field to null Many thanks |
Thu, Jul 15 2021 12:39 PM | Permanent Link |
Michael Saunders | This also the same issue
TestTable.Columns['Date'].asdate := Date; |
Thu, Jul 15 2021 3:36 PM | Permanent Link |
Walter Matte Tactical Business Corporation | How to set to null: TestTable.Columns['Date'].Clear; |
Thu, Jul 15 2021 4:11 PM | Permanent Link |
Michael Saunders | Thanks but I still get an error Should this work for Inserting or just amending existing values
|
Thu, Jul 15 2021 4:22 PM | Permanent Link |
Walter Matte Tactical Business Corporation | It should work! Did you call Insert on the dataset first? Or is the Dataset configured for AutoEdit?
Walter |
Thu, Jul 15 2021 4:44 PM | Permanent Link |
Michael Saunders | Here is my code ( TestTable.Columns['Date']. in my first post was a typo)
Database.StartTransaction; try TestTable.Insert; TestTable.Columns['TestField1'].AsString := 'AADDA'; TestTable.Columns['TestField2'].AsString := 'TEST'; TestTable.Columns['TestInt'].AsInteger := 23; TestTable.Columns['TestDate'].clear; TestTable.save; Database.Commit; except if Database.InTransaction then Database.Rollback; raise; end; |
Thu, Jul 15 2021 4:46 PM | Permanent Link |
Michael Saunders | Here is the EDB Table definition
CREATE TABLE "TestTable" ( "TestField1" VARCHAR(20) COLLATE "UNI", "TestField2" VARCHAR(20) COLLATE "UNI", "TestInt" INTEGER NOT NULL, "TestDate" DATE ) 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! |
Fri, Jul 16 2021 5:13 AM | Permanent Link |
Michael Saunders | TestTable.Columns['TestDate'].clear fails but it does work OK provided that Testdate is a different field type eg String |
Tue, Jul 20 2021 5:13 AM | Permanent Link |
Michael Saunders | TestTable.Columns['TestDate'].clear was a bug and has been fixed in build 3
|
This web page was last updated on Thursday, December 5, 2024 at 07:37 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |