|
From: <na...@us...> - 2009-08-06 17:14:48
|
Revision: 817
http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=817&view=rev
Author: nandod
Date: 2009-08-06 17:14:40 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
* Allow navigational brokers in D2009 to read embedded attributes written by previous versions (ansi-only).
* Damaged Primer.dproj for D2007 restored.
Modified Paths:
--------------
trunk/Demos/PrimerCross/Primer.dproj
trunk/Demos/PrimerCross/Primer.mdr
trunk/Source/Core/InstantBrokers.pas
trunk/Source/Core/InstantClasses.pas
trunk/Source/Core/InstantConsts.pas
trunk/Source/Core/InstantPersistence.pas
Modified: trunk/Demos/PrimerCross/Primer.dproj
===================================================================
--- trunk/Demos/PrimerCross/Primer.dproj 2009-08-06 15:27:10 UTC (rev 816)
+++ trunk/Demos/PrimerCross/Primer.dproj 2009-08-06 17:14:40 UTC (rev 817)
@@ -1,183 +1,151 @@
- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{d197a2d4-31b9-43b1-8070-3f804d86e53f}</ProjectGuid>
- <MainSource>Primer.dpr</MainSource>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
- <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName>
- <ProjectVersion>12.0</ProjectVersion>
- <Config Condition="'$(Config)'==''">Debug</Config>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
- <Cfg_1>true</Cfg_1>
- <CfgParent>Base</CfgParent>
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
- <Cfg_2>true</Cfg_2>
- <CfgParent>Base</CfgParent>
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Base)'!=''">
- <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_1)'!=''">
- <Version>7.0</Version>
- <DCC_DebugInformation>False</DCC_DebugInformation>
- <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
- <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
- <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
- <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
- <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath>
- <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath>
- <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_2)'!=''">
- <Version>7.0</Version>
- <DCC_Define>DEBUG;IO_STATEMENT_LOGGING;$(DCC_Define)</DCC_Define>
- <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
- <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ResourcePath)</DCC_ResourcePath>
- <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_ObjPath)</DCC_ObjPath>
- <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql;$(DCC_IncludePath)</DCC_IncludePath>
- </PropertyGroup>
- <ProjectExtensions>
- <Borland.Personality>Delphi.Personality.12</Borland.Personality>
- <Borland.ProjectType>VCLApplication</Borland.ProjectType>
- <BorlandProject>
- <Delphi.Personality>
- <Parameters>
- <Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="LoadAllSymbols">True</Parameters>
- <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
- </Parameters>
- <VersionInfo>
- <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
- <VersionInfo Name="AutoIncBuild">False</VersionInfo>
- <VersionInfo Name="MajorVer">2</VersionInfo>
- <VersionInfo Name="MinorVer">0</VersionInfo>
- <VersionInfo Name="Release">0</VersionInfo>
- <VersionInfo Name="Build">0</VersionInfo>
- <VersionInfo Name="Debug">False</VersionInfo>
- <VersionInfo Name="PreRelease">False</VersionInfo>
- <VersionInfo Name="Special">False</VersionInfo>
- <VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">False</VersionInfo>
- <VersionInfo Name="Locale">1030</VersionInfo>
- <VersionInfo Name="CodePage">1252</VersionInfo>
- </VersionInfo>
- <VersionInfoKeys>
- <VersionInfoKeys Name="CompanyName">InstantObjects.org</VersionInfoKeys>
- <VersionInfoKeys Name="FileDescription">Primer Demo</VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">2.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="InternalName"/>
- <VersionInfoKeys Name="LegalCopyright">MPL public license</VersionInfoKeys>
- <VersionInfoKeys Name="LegalTrademarks"/>
- <VersionInfoKeys Name="OriginalFilename"/>
- <VersionInfoKeys Name="ProductName"/>
- <VersionInfoKeys Name="ProductVersion">2.0</VersionInfoKeys>
- <VersionInfoKeys Name="Comments"/>
- </VersionInfoKeys>
- <Source>
- <Source Name="MainSource">Primer.dpr</Source>
- </Source>
- </Delphi.Personality>
- <ModelSupport>False</ModelSupport>
- </BorlandProject>
- <ProjectFileVersion>12</ProjectFileVersion>
- </ProjectExtensions>
- <ItemGroup>
- <DelphiCompile Include="Primer.dpr">
- <MainSource>MainSource</MainSource>
- </DelphiCompile>
- <DCCReference Include="Main.pas">
- <Form>MainForm</Form>
- </DCCReference>
- <DCCReference Include="Model\Model.pas"/>
- <DCCReference Include="ContactView.pas">
- <Form>ContactViewForm</Form>
- <DesignClass>TFrame</DesignClass>
- </DCCReference>
- <DCCReference Include="BasicView.pas">
- <Form>BasicViewForm</Form>
- <DesignClass>TFrame</DesignClass>
- </DCCReference>
- <DCCReference Include="BasicEdit.pas">
- <Form>BasicEditForm</Form>
- </DCCReference>
- <DCCReference Include="ContactEdit.pas">
- <Form>ContactEditForm</Form>
- </DCCReference>
- <DCCReference Include="PersonEdit.pas">
- <Form>PersonEditForm</Form>
- </DCCReference>
- <DCCReference Include="CompanyEdit.pas">
- <Form>CompanyEditForm</Form>
- </DCCReference>
- <DCCReference Include="DemoData.pas"/>
- <DCCReference Include="ContactFilterEdit.pas">
- <Form>ContactFilterEditForm</Form>
- </DCCReference>
- <DCCReference Include="MainData.pas">
- <Form>MainDataModule</Form>
- <DesignClass>TDataModule</DesignClass>
- </DCCReference>
- <DCCReference Include="ContactBrowse.pas">
- <Form>ContactBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="CompanyBrowse.pas">
- <Form>CompanyBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="PerformanceView.pas">
- <Form>PerformanceViewForm</Form>
- <DesignClass>TFrame</DesignClass>
- </DCCReference>
- <DCCReference Include="Welcome.pas">
- <Form>WelcomeForm</Form>
- </DCCReference>
- <DCCReference Include="PersonBrowse.pas">
- <Form>PersonBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="BasicBrowse.pas">
- <Form>BasicBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="CountryBrowse.pas">
- <Form>CountryBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="DemoDataRequest.pas">
- <Form>DemoDataRequestForm</Form>
- </DCCReference>
- <DCCReference Include="ContactSort.pas">
- <Form>ContactSortForm</Form>
- </DCCReference>
- <DCCReference Include="CategoryBrowse.pas">
- <Form>CategoryBrowseForm</Form>
- </DCCReference>
- <DCCReference Include="HelpView.pas">
- <Form>HelpViewForm</Form>
- <DesignClass>TFrame</DesignClass>
- </DCCReference>
- <DCCReference Include="QueryView.pas">
- <Form>QueryViewForm</Form>
- <DesignClass>TFrame</DesignClass>
- </DCCReference>
- <DCCReference Include="RandomData.pas"/>
- <DCCReference Include="Stopwatch.pas"/>
- <DCCReference Include="Utility.pas"/>
- <BuildConfiguration Include="Base">
- <Key>Base</Key>
- </BuildConfiguration>
- <BuildConfiguration Include="Debug">
- <Key>Cfg_2</Key>
- <CfgParent>Base</CfgParent>
- </BuildConfiguration>
- <BuildConfiguration Include="Release">
- <Key>Cfg_1</Key>
- <CfgParent>Base</CfgParent>
- </BuildConfiguration>
- </ItemGroup>
- <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
- </Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{6ddf3705-1ec1-4b67-8127-f887a4deb03e}</ProjectGuid>
+ <MainSource>Primer.dpr</MainSource>
+ <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+ <DCC_DependencyCheckOutputName>Primer.exe</DCC_DependencyCheckOutputName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <Version>7.0</Version>
+ <DCC_DebugInformation>False</DCC_DebugInformation>
+ <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+ <DCC_Define>RELEASE;IO_STATEMENT_LOGGING</DCC_Define>
+ <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_UnitSearchPath>
+ <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ResourcePath>
+ <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ObjPath>
+ <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_IncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <Version>7.0</Version>
+ <DCC_Define>DEBUG;IO_STATEMENT_LOGGING</DCC_Define>
+ <DCC_UnitSearchPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_UnitSearchPath>
+ <DCC_ResourcePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ResourcePath>
+ <DCC_ObjPath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_ObjPath>
+ <DCC_IncludePath>..\..\Source\Core;..\..\Source\Brokers\ADO;..\..\Source\Brokers\BDE;..\..\Source\Brokers\DBX;..\..\Source\Brokers\IBX;..\..\Source\Brokers\XML;..\..\Source\Catalogs\IBFb;..\..\Source\Catalogs\MSSql;..\..\Source\Catalogs\MySql</DCC_IncludePath>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>Delphi.Personality</Borland.Personality>
+ <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+ <BorlandProject>
+<BorlandProject> <Delphi.Personality> <Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="LoadAllSymbols">True</Parameters>
+ <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
+ </Parameters>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">2</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">0</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1030</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName">InstantObjects.org</VersionInfoKeys>
+ <VersionInfoKeys Name="FileDescription">Primer Demo</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">2.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
+ <VersionInfoKeys Name="LegalCopyright">MPL public license</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
+ <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">2.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments"></VersionInfoKeys>
+ </VersionInfoKeys>
+ <Source>
+ <Source Name="MainSource">Primer.dpr</Source>
+ </Source>
+ </Delphi.Personality> </BorlandProject></BorlandProject>
+ </ProjectExtensions>
+ <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
+ <ItemGroup>
+ <DelphiCompile Include="Primer.dpr">
+ <MainSource>MainSource</MainSource>
+ </DelphiCompile>
+ <DCCReference Include="BasicBrowse.pas">
+ <Form>BasicBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="BasicEdit.pas">
+ <Form>BasicEditForm</Form>
+ </DCCReference>
+ <DCCReference Include="BasicView.pas">
+ <Form>BasicViewForm</Form>
+ <DesignClass>TFrame</DesignClass>
+ </DCCReference>
+ <DCCReference Include="CategoryBrowse.pas">
+ <Form>CategoryBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="CompanyBrowse.pas">
+ <Form>CompanyBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="CompanyEdit.pas">
+ <Form>CompanyEditForm</Form>
+ </DCCReference>
+ <DCCReference Include="ContactBrowse.pas">
+ <Form>ContactBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="ContactEdit.pas">
+ <Form>ContactEditForm</Form>
+ </DCCReference>
+ <DCCReference Include="ContactFilterEdit.pas">
+ <Form>ContactFilterEditForm</Form>
+ </DCCReference>
+ <DCCReference Include="ContactSort.pas">
+ <Form>ContactSortForm</Form>
+ </DCCReference>
+ <DCCReference Include="ContactView.pas">
+ <Form>ContactViewForm</Form>
+ <DesignClass>TFrame</DesignClass>
+ </DCCReference>
+ <DCCReference Include="CountryBrowse.pas">
+ <Form>CountryBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="DemoData.pas" />
+ <DCCReference Include="DemoDataRequest.pas">
+ <Form>DemoDataRequestForm</Form>
+ </DCCReference>
+ <DCCReference Include="HelpView.pas">
+ <Form>HelpViewForm</Form>
+ <DesignClass>TFrame</DesignClass>
+ </DCCReference>
+ <DCCReference Include="Main.pas">
+ <Form>MainForm</Form>
+ </DCCReference>
+ <DCCReference Include="MainData.pas">
+ <Form>MainDataModule</Form>
+ <DesignClass>TDataModule</DesignClass>
+ </DCCReference>
+ <DCCReference Include="Model\Model.pas" />
+ <DCCReference Include="PerformanceView.pas">
+ <Form>PerformanceViewForm</Form>
+ <DesignClass>TFrame</DesignClass>
+ </DCCReference>
+ <DCCReference Include="PersonBrowse.pas">
+ <Form>PersonBrowseForm</Form>
+ </DCCReference>
+ <DCCReference Include="PersonEdit.pas">
+ <Form>PersonEditForm</Form>
+ </DCCReference>
+ <DCCReference Include="QueryView.pas">
+ <Form>QueryViewForm</Form>
+ <DesignClass>TFrame</DesignClass>
+ </DCCReference>
+ <DCCReference Include="RandomData.pas" />
+ <DCCReference Include="Stopwatch.pas" />
+ <DCCReference Include="Utility.pas" />
+ <DCCReference Include="Welcome.pas">
+ <Form>WelcomeForm</Form>
+ </DCCReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
Modified: trunk/Demos/PrimerCross/Primer.mdr
===================================================================
(Binary files differ)
Modified: trunk/Source/Core/InstantBrokers.pas
===================================================================
--- trunk/Source/Core/InstantBrokers.pas 2009-08-06 15:27:10 UTC (rev 816)
+++ trunk/Source/Core/InstantBrokers.pas 2009-08-06 17:14:40 UTC (rev 817)
@@ -2329,7 +2329,7 @@
procedure TInstantNavigationalResolver.ReadPart(Attribute: TInstantPart);
var
Field: TField;
- Stream: TStringStream;
+ Stream: TInstantStringStream;
PartClassName: string;
ObjID: string;
begin
@@ -2356,7 +2356,7 @@
Field := FieldByName(Metadata.FieldName);
if not FieldHasObjects(Field) then
Exit;
- Stream := TStringStream.Create(Field.AsString);
+ Stream := TInstantStringStream.Create(Field.AsString);
try
LoadObjectFromStream(Stream);
finally
@@ -2369,7 +2369,7 @@
procedure TInstantNavigationalResolver.ReadParts(Attribute: TInstantParts);
var
Field: TField;
- Stream: TStringStream;
+ Stream: TInstantStringStream;
LinkDatasetResolver: TInstantNavigationalLinkResolver;
begin
with Attribute do
@@ -2386,7 +2386,7 @@
Field := FieldByName(Metadata.FieldName);
if not FieldHasObjects(Field) then
Exit;
- Stream := TStringStream.Create(Field.AsString);
+ Stream := TInstantStringStream.Create(Field.AsString);
try
LoadObjectsFromStream(Stream);
finally
@@ -2413,7 +2413,7 @@
Attribute: TInstantReferences);
var
Field: TField;
- Stream: TStringStream;
+ Stream: TInstantStringStream;
LinkDatasetResolver: TInstantNavigationalLinkResolver;
begin
with Attribute do
@@ -2430,7 +2430,7 @@
Field := FieldByName(Metadata.FieldName);
if not FieldHasObjects(Field) then
Exit;
- Stream := TStringStream.Create(Field.AsString);
+ Stream := TInstantStringStream.Create(Field.AsString);
try
LoadReferencesFromStream(Stream);
finally
@@ -3557,7 +3557,7 @@
procedure ReadPartAttribute;
var
- Stream: TStringStream;
+ Stream: TInstantStringStream;
LPartClassName: string;
LPartId: string;
begin
@@ -3583,7 +3583,7 @@
end
else
begin
- Stream := TStringStream.Create(ReadBlobField(DataSet,
+ Stream := TInstantStringStream.Create(ReadBlobField(DataSet,
AFieldName));
try
if Stream.Size = 0 then
@@ -3598,7 +3598,7 @@
procedure ReadPartsAttribute;
var
- Stream: TStringStream;
+ Stream: TInstantStringStream;
LinkResolver: TInstantSQLLinkResolver;
begin
if AttributeMetadata.StorageKind = skExternal then
@@ -3618,7 +3618,7 @@
end
else
begin
- Stream := TStringStream.Create(ReadBlobField(DataSet, AFieldName));
+ Stream := TInstantStringStream.Create(ReadBlobField(DataSet, AFieldName));
try
if Stream.Size = 0 then
(Attribute as TInstantParts).Reset
@@ -3639,7 +3639,7 @@
procedure ReadReferencesAttribute;
var
- Stream: TStringStream;
+ Stream: TInstantStringStream;
LinkResolver: TInstantSQLLinkResolver;
begin
if AttributeMetadata.StorageKind = skExternal then
@@ -3659,7 +3659,7 @@
end
else
begin
- Stream := TStringStream.Create(ReadBlobField(DataSet, AFieldName));
+ Stream := TInstantStringStream.Create(ReadBlobField(DataSet, AFieldName));
try
if Stream.Size = 0 then
(Attribute as TInstantReferences).Reset
Modified: trunk/Source/Core/InstantClasses.pas
===================================================================
--- trunk/Source/Core/InstantClasses.pas 2009-08-06 15:27:10 UTC (rev 816)
+++ trunk/Source/Core/InstantClasses.pas 2009-08-06 17:14:40 UTC (rev 817)
@@ -1786,10 +1786,8 @@
Producer.WriteData(CurrToStr(Reader.ReadCurrency));
vaDate:
Producer.WriteData(InstantDateTimeToStr(Reader.ReadDate));
- vaString, vaLString:
+ vaString, vaLString, vaUTF8String, vaWString:
Producer.WriteEscapedData(Reader.ReadString);
- vaUTF8String:
- Producer.WriteEscapedData(Reader.ReadString);
vaSet:
begin
Reader.ReadValue;
Modified: trunk/Source/Core/InstantConsts.pas
===================================================================
--- trunk/Source/Core/InstantConsts.pas 2009-08-06 15:27:10 UTC (rev 816)
+++ trunk/Source/Core/InstantConsts.pas 2009-08-06 17:14:40 UTC (rev 817)
@@ -139,7 +139,7 @@
SInvalidOperator = 'Invalid operator: %s';
SInvalidPropertyValue = 'Invalid property value';
SInvalidToken = 'Invalid token ''%s''';
- SInvalidValueType = 'Invalid value type';
+ SInvalidValueType = 'Invalid value type ''%s''';
SKeyViolation = 'Key violation for object %s(''%s'')';
SLoginPromptFailure = 'Couldn''t find login dialog. Please use unit DBLogDlg or set LoginPrompt to False';
SMetadataMismatch = 'Metadata mismatch for attribute %s(''%s'')';
Modified: trunk/Source/Core/InstantPersistence.pas
===================================================================
--- trunk/Source/Core/InstantPersistence.pas 2009-08-06 15:27:10 UTC (rev 816)
+++ trunk/Source/Core/InstantPersistence.pas 2009-08-06 17:14:40 UTC (rev 817)
@@ -5620,20 +5620,20 @@
var
Count: Integer;
Bin, Hex: string;
+ LNextValueType: TValueType;
begin
with Converter do
begin
- case Reader.NextValue of
+ LNextValueType := Reader.NextValue;
+ case LNextValueType of
vaInt8, vaInt16, vaInt32:
Producer.WriteData(IntToStr(Reader.ReadInteger));
vaExtended:
Producer.WriteData(FloatToStr(Reader.ReadFloat));
vaDate:
Producer.WriteData(InstantDateTimeToStr(Reader.ReadDate));
- vaString, vaLString:
+ vaString, vaLString, vaUTF8String, vaWString:
Producer.WriteEscapedData(Reader.ReadString);
- vaUTF8String:
- Producer.WriteEscapedData(Reader.ReadString);
vaCurrency:
Producer.WriteEscapedData(CurrToStr(Reader.ReadCurrency));
vaIdent:
@@ -5669,7 +5669,8 @@
Reader.ReadListEnd;
end;
else
- raise EInstantStreamError.Create(SInvalidValueType);
+ raise EInstantStreamError.CreateFmt(SInvalidValueType,
+ [GetEnumName(TypeInfo(TValueType), Ord(LNextValueType))]);
end;
end;
end;
|