ZeosLib giving me fits with AVs...
Posted: 03.12.2010, 22:19
I am building upon the Object Persistence Framework based on the
source code from this article:
http://www.tabdee.ltd.uk/papers/BuildingAnOpf.html
I have been trying to build a MySQL mapper using the ZeosLib objects.
It wasn't difficult converting from ADO to MySQL, but I cannot understand
why I keep getting AVs when closing the form. Can anyone help me
figure this thing out? It is driving me crazy. I need to hurry and get this
done so I can build an entire application from this architecture.
Here is the database structure and the modified demo source code is
attached.
source code from this article:
http://www.tabdee.ltd.uk/papers/BuildingAnOpf.html
I have been trying to build a MySQL mapper using the ZeosLib objects.
It wasn't difficult converting from ADO to MySQL, but I cannot understand
why I keep getting AVs when closing the form. Can anyone help me
figure this thing out? It is driving me crazy. I need to hurry and get this
done so I can build an entire application from this architecture.
Here is the database structure and the modified demo source code is
attached.
Code: Select all
# Dumping database structure for dakota_inv
DROP DATABASE IF EXISTS `dakota_inv`;
CREATE DATABASE IF NOT EXISTS `dakota_inv` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `dakota_inv`;
/* DB Structure */
CREATE TABLE `addresses` (
`Owner_OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`Version` INT(11) NOT NULL DEFAULT '0',
`Add_HouseNumber` VARCHAR(10) NULL DEFAULT '' COLLATE 'utf8_unicode_ci',
`Add_Street` VARCHAR(50) NULL DEFAULT '' COLLATE 'utf8_unicode_ci',
`Add_Town` VARCHAR(50) NULL DEFAULT '' COLLATE 'utf8_unicode_ci',
`Add_Postcode` VARCHAR(20) NULL DEFAULT '' COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`Owner_OID`)
)
COLLATE='utf8_unicode_ci'
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;
CREATE TABLE `contacts` (
`Owner_OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`Version` INT(11) NOT NULL DEFAULT '0',
`Cont_Description` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8_unicode_ci',
`Cont_PhoneNumber` VARCHAR(20) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`OID`)
)
COLLATE='utf8_unicode_ci'
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;
CREATE TABLE `persons` (
`Owner_OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`Version` INT(11) NOT NULL DEFAULT '0',
`Pers_Title` VARCHAR(10) NOT NULL DEFAULT '0' COLLATE 'utf8_unicode_ci',
`Pers_FirstName` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8_unicode_ci',
`Pers_Surname` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`OID`)
)
COLLATE='utf8_unicode_ci'
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;
CREATE TABLE `relatives` (
`Owner_OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`OID` CHAR(38) NOT NULL COLLATE 'utf8_unicode_ci',
`Version` INT(11) NOT NULL DEFAULT '0',
`Rel_Relationship` VARCHAR(10) NOT NULL DEFAULT '0' COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`OID`)
)
COLLATE='utf8_unicode_ci'
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;