Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread AV in build 18
Tue, Aug 3 2010 2:51 AMPermanent Link

Peter

I have a system that has worked hundreds of times in the past, but is failing with an AV in build 18. It is complicated a little by the fact that the EDBEngine uses an EncryptionPassword that is non-standard, so I can't use the standard EDBManager to test the code.

When a user migrates from the DBISAM 3 version of my app, they may have run the migrator in the past, and now wish to overwrite the tables that existed from the earlier migration. The way the system worked previously was to

1. Delete all config files (EDBConfig.EDBCfg, EDBCfg.Old, EDBLog etc), using if FileExists(xxx) then DeleteFile(xxx);
2. Open a new session using EDBSession1.LoginPassword := 'EDBDefault';
3. Create a new database if none exists, using 'SELECT * FROM Databases WHERE Name=MyDatabase', and if the RecordCount=0, then 'CREATE DATABASE "MyDatabase" PATH....'.
4. An EDBQuery.DataBaseName is set to MyDatabase, then the EDBQuery.SQL.Text := 'SELECT Name FROM Information.Tables WHERE Name NOT LIKE ''rb%''';
5. The EDBQuery is then opened. This results in an AV, whereas it previously did not.
6. At this point I can use an EDBMgr that I compiled with 2.03 build 8, using my EncryptionPassword, and I can open the database, using the LoginPassword of 'EDBDefault'.
7. The migration process also involves my changing the LoginPassword to 'mypassword', which means that the database that is being addressed by the SQL in point 4 was created with a password different to EDBDefault, but I have already replaced the config files. The LoginPassword of 'mypassword' does not open the database using the EDBMgr as in point 6, so all that behaves as it should.

Is there a problem with the way I go about things, or is there an issue with build 18?

Regards & TIA

Peter
Tue, Aug 3 2010 7:52 AMPermanent Link

Peter

I reverted to build 17 & the problem went away.

Regards

Peter
Tue, Aug 3 2010 1:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Peter,

<< 1. Delete all config files (EDBConfig.EDBCfg, EDBCfg.Old, EDBLog etc),
using if FileExists(xxx) then DeleteFile(xxx);
2. Open a new session using EDBSession1.LoginPassword := 'EDBDefault';
3. Create a new database if none exists, using 'SELECT * FROM Databases
WHERE Name=MyDatabase', and if the RecordCount=0, then 'CREATE DATABASE
"MyDatabase" PATH....'.
4. An EDBQuery.DataBaseName is set to MyDatabase, then the
EDBQuery.SQL.Text := 'SELECT Name FROM Information.Tables WHERE Name NOT
LIKE ''rb%'''; >>

Got it - it's the partial-length search on the LIKE.  I'll have a fix
shortly for this.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image