Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Reported for Version 2.18 » View Incident Report |
Serious |
Reported By: Manuel Alonso Conde Cantero [ETICONSA In Reported On: 4/13/2015 For: Version 2.18 Build 3 |
// I have a form with the following components : Db1: TEDBDatabase; Tb1: TEDBTable; Session1: TEDBSession; // and this is the FormCreate for the above form : procedure TForm1.FormCreate(Sender: TObject); var L : TStringList; dDate : TDate; begin Session1.SessionName := 'Session1'; Session1.SessionType := stLocal; Session1.LoginUser := 'Administrator'; Session1.LoginPassword := 'EDBDefault'; Session1.LocalConfigPath := ExtractFileDir( Application.ExeName ); edbcomps.Engine.ConfigPath := Session1.LocalConfigPath; Session1.Open; Db1.Database := 'TEST'; Db1.DatabaseName := Db1.Database; Db1.SessionName := Session1.SessionName; Tb1.DatabaseName := Db1.DatabaseName; Tb1.TableName := 'TESTDATE'; Tb1.SessionName := Session1.SessionName; L := TStringList.Create; try Session1.GetDatabases( L ); if L.IndexOf( Db1.Database ) = -1 then Session1.Execute( 'CREATE DATABASE "' + Db1.Database + '" PATH ' + QuotedStr( Session1.LocalConfigPath ) ); Db1.Open; L.Clear; Session1.GetTableNames( Db1.Database, L ); if L.IndexOf( Tb1.TableName ) = -1 then begin Db1.Execute( 'CREATE TABLE "' + Tb1.TableName + '" ( "DATEFIELD" DATE )' ); Db1.Execute( 'CREATE INDEX "iDate" ON "' + Tb1.TableName + '" ("DATEFIELD")' ); end; finally L.Free; end; Tb1.Open; Tb1.IndexName := 'iDate'; dDate := Date; // test FindKey if not Tb1.FindKey( [ dDate ] ) then begin Tb1.Append; Tb1.FieldByName( 'DATEFIELD' ).Value := dDate; Tb1.Post; end; // test FindKey again Tb1.FindKey( [ dDate ] ) ; // test Locate -------> THIS WILL RAISE EXCEPTION : ElevateDB Error #1011 An error occurred with the value // 42105 (A conversion error occurred with the value 42105) Tb1.Locate( 'DATEFIELD', dDate, [] ); end;
This web page was last updated on Tuesday, April 23, 2024 at 08:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |