Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 18 total
Thread In memory database
Sat, Mar 24 2007 2:13 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

Trying to get to be able to select into a memory table I thought

'CREATE DATABASE "RAM" IN MEMORY'

The program crashed (naturally) and trying to run it next time I get

Error #400 the database RAM already exists

Roy Lambert
Mon, Mar 26 2007 8:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Trying to get to be able to select into a memory table I thought

'CREATE DATABASE "RAM" IN MEMORY'

The program crashed (naturally) and trying to run it next time I get >>

It works fine here (without the single quotes).  Did you actually execute
the SQL with the single quotes around it ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Mar 27 2007 3:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Nah - just cut and paste from the IDE

Roy Lambert
Tue, Mar 27 2007 2:19 PMPermanent Link

Jim Margarit
Tim Young [Elevate Software] wrote:
> Roy,
>
> << Trying to get to be able to select into a memory table I thought
>
>  'CREATE DATABASE "RAM" IN MEMORY'
>
>  The program crashed (naturally) and trying to run it next time I get >>
>
> It works fine here (without the single quotes).  Did you actually execute
> the SQL with the single quotes around it ?
>

http://www.codinghorror.com/blog/archives/000818.html

Had to chuckle because your reply reminded me of this blog entry. Shiny
new stickers to go on the (virtual) EDB boxes.

Jim
Wed, Mar 28 2007 7:16 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Nah - just cut and paste from the IDE >>

Is it reproducible in the context of your code ?  If so, can you send me the
code ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Mar 28 2007 7:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jim,

<< http://www.codinghorror.com/blog/archives/000818.html

Had to chuckle because your reply reminded me of this blog entry. Shiny new
stickers to go on the (virtual) EDB boxes. >>

Smiley

Sometimes there's no other way to respond, unfortunately, especially with
something as simple as a CREATE DATABASE statement combined with the fact
that I don't have any incidents logged for such a problem.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Mar 28 2007 8:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Using D2006 use Alt-r-e to break it and then run again


object Form1: TForm1
 Left = 248
 Top = 81
 Caption = 'Form1'
 ClientHeight = 536
 ClientWidth = 971
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -12
 Font.Name = 'Arial'
 Font.Style = []
 OldCreateOrder = False
 OnCreate = FormCreate
 PixelsPerInch = 96
 TextHeight = 15
 object EDBQuery1: TEDBQuery
   DatabaseName = 'Configuration'
   SessionName = 'Default'
   SQL.Strings = (
     'CREATE DATABASE "RAM" IN MEMORY')
   Params = <>
   Left = 32
   Top = 16
 end
end



unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, edbcomps;
type
TForm1 = class(TForm)
 EDBQuery1: TEDBQuery;
 procedure FormCreate(Sender: TObject);
private
   { Private declarations }
public
   { Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Session.LoginPassword := 'EDBDefault';
Session.LoginUser := 'Administrator';
Engine.Active := True;
edbquery1.ExecSQL;
end;
end.



Roy Lambert
Thu, Mar 29 2007 6:58 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Using D2006 use Alt-r-e to break it and then run again >>

I'm not sure what you mean - are you saying that resetting the application
after the database is created is causing the problem ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Mar 29 2007 8:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


As I said in the first post the program crashed and Alt-r-e is one of the few ways I know to reliably "crash" a program.

I've just tried pasting the code I posted back into the D2006 IDE and running it. Now remember my machine has definitely been turned off overnight but I still get the error.

Error #400 the database RAM already exists

After wading through your code, the cd collector example and flogging my brain I think I know what's happening. It's probably WAD, but is counter intuitive.

The data is probably disappearing from ram (I have no real no way of knowing) but the definition stays in the configuration database so when I reopen an app the memory database is already defined. I'm used to disk databases/tables staying put but not memory ones. Those I would expect to be transient.


Roy Lambert
Thu, Mar 29 2007 8:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Mt scrawlings have prompted two more questions:

What happens to the table definition in the memory database when the app closes?

Will "DELETE FROM memorytable" reclaim the space? If not we need something that allows us to do so.

Roy Lambert
Page 1 of 2Next Page »
Jump to Page:  1 2
Image