Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Memory tables & database.execute
Sat, Dec 22 2007 11:41 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I'm starting to play with memory tables. I'm trying to modify my SelfMakeMemoryTable function from DBISAM to ElevateDB.

I fell at the first hurdle! In the original I create a TDBISAMSession and TDBISAMQuery to do the work. I thought I'd be clever and do edbTable.Database.Execute's (naturally wrapping the drop statement in a try except block) but I get an AV.


Trial.Database.Execute('CREATE TABLE "Trial" ("one" CHAR(1) COLLATE "ANSI","two" CHAR(1) COLLATE "ANSI" ) VERSION 1.00 INDEX PAGE SIZE 4096');

Any suggestions?

Roy Lambert
Sat, Dec 22 2007 2:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I fell at the first hurdle! In the original I create a TDBISAMSession and
TDBISAMQuery to do the work. I thought I'd be clever and do
edbTable.Database.Execute's (naturally wrapping the drop statement in a try
except block) but I get an AV. >>

Is the table open ?  If not, then the Database property is nil:

http://www.elevatesoft.com/edb1d7_tedbdbdataset_database.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Dec 23 2007 6:47 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>Is the table open ? If not, then the Database property is nil:
>
>http://www.elevatesoft.com/edb1d7_tedbdbdataset_database.htm

That link reads "is automatically set when the database specified by the DatabaseName property is opened." Doesn't mention the table, and I'd made sure the database was open (connected).

When I looked at the code in edbcomps I realised you're simple creating a query in the method so I just created my own.

Roy Lambert


Thu, Dec 27 2007 3:31 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< That link reads "is automatically set when the database specified by the
DatabaseName property is opened." Doesn't mention the table, and I'd made
sure the database was open (connected). >>

The table/query/storedproc/script (dataset) is the component from which the
property originates, hence it is implied that it's talking about the
table/query/storedproc/script.  The property is a reference to the database,
and thus will not be set unless the database is opened.  It will be nil at
any other time.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image