Skip to content

Commit

Permalink
Update to Access 2016 version, NET 4.0 full, VS 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
mnieto committed Sep 26, 2020
1 parent 00ea71b commit bc54270
Show file tree
Hide file tree
Showing 20 changed files with 84 additions and 52 deletions.
1 change: 1 addition & 0 deletions AccessIO/AccessAccdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
public class AccessAccdb: AccessApp {
Expand Down
30 changes: 18 additions & 12 deletions AccessIO/AccessIO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Office.Interop.Access, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
Expand Down Expand Up @@ -133,15 +130,6 @@
<None Include="ImportExport\DgrmPropertyTransform.cd" />
</ItemGroup>
<ItemGroup>
<COMReference Include="DAO">
<Guid>{00025E01-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
Expand All @@ -151,6 +139,24 @@
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Access">
<Guid>{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Access.Dao">
<Guid>{4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28}</Guid>
<VersionMajor>12</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
Expand Down
1 change: 1 addition & 0 deletions AccessIO/AccessMdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Access = Microsoft.Office.Interop.Access;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
public class AccessMdb : AccessApp {
Expand Down
2 changes: 1 addition & 1 deletion AccessIO/CustomObjects/DatabaseDao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.IO;
using System.Text.RegularExpressions;
using System.Linq;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {

Expand Down
2 changes: 1 addition & 1 deletion AccessIO/CustomObjects/Relations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.IO;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
/// <summary>
Expand Down
30 changes: 15 additions & 15 deletions AccessIO/CustomObjects/Table.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.IO;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
/// <summary>
Expand Down Expand Up @@ -221,7 +221,7 @@ public override void Load(string fileName) {

//manage table relations
if (tableExists) {
List<Relation> relationsList = new List<Relation>();
List<dao.Relation> relationsList = new List<dao.Relation>();
foreach (dao.Relation relation in GetTableRelations(db)) {
dao.Relation newRelation = db.CreateRelation(relation.Name, relation.Table, relation.ForeignTable, relation.Attributes);
//try { newRelation.PartialReplica = relation.PartialReplica; } catch { } //Accessing this property causes an exception ¿?
Expand Down Expand Up @@ -260,18 +260,18 @@ public override void Load(string fileName) {

private void AddCustomProperties(Dictionary<string, object> props) {
PropertyCollectionDao propColl = new PropertyCollectionDao(tableDef, tableDef.Properties);
propColl.AddOptionalProperty(props, "Description", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "ConflictTable", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "ReplicaFilter", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "Orientation", DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "OrderByOn", DataTypeEnum.dbBoolean);
propColl.AddOptionalProperty(props, "SubdatasheetName", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "LinkChildFields", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "LinkMasterFields", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "SubdatasheetHeight", DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "SubdatasheetExpanded", DataTypeEnum.dbBoolean);
propColl.AddOptionalProperty(props, "DefaultView", DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "OrderBy", DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "Description", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "ConflictTable", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "ReplicaFilter", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "Orientation", dao.DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "OrderByOn", dao.DataTypeEnum.dbBoolean);
propColl.AddOptionalProperty(props, "SubdatasheetName", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "LinkChildFields", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "LinkMasterFields", dao.DataTypeEnum.dbText);
propColl.AddOptionalProperty(props, "SubdatasheetHeight", dao.DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "SubdatasheetExpanded", dao.DataTypeEnum.dbBoolean);
propColl.AddOptionalProperty(props, "DefaultView", dao.DataTypeEnum.dbInteger);
propColl.AddOptionalProperty(props, "OrderBy", dao.DataTypeEnum.dbText);
}

private dao.Field ReadField(ImportObject import) {
Expand Down Expand Up @@ -314,7 +314,7 @@ private bool ExistsTableDef(dao.Database db, string tableName) {
}

private List<dao.Relation> GetTableRelations(dao.Database db) {
List<dao.Relation> result = new List<Relation>();
List<dao.Relation> result = new List<dao.Relation>();
foreach (dao.Relation relation in db.Relations) {
if (relation.Table == this.Name || relation.ForeignTable == this.Name)
result.Add(relation);
Expand Down
2 changes: 1 addition & 1 deletion AccessIO/Field.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion AccessIO/ImportExport/ExportObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.IO;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {

Expand Down
2 changes: 1 addition & 1 deletion AccessIO/ImportExport/IPropertyTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Access = Microsoft.Office.Interop.Access;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {

Expand Down
4 changes: 2 additions & 2 deletions AccessIO/ImportExport/Locales.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using System.Text;
using System.Reflection;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
//interesting access page
Expand All @@ -23,7 +23,7 @@ public Locales() {
}

private void LoadLocaleStrings() {

FieldInfo[] fields = typeof(dao.LanguageConstants).GetFields(BindingFlags.Public | BindingFlags.Static);
foreach (FieldInfo field in fields) {
string code = LangCode(field.GetValue(null).ToString());
Expand Down
2 changes: 1 addition & 1 deletion AccessIO/ImportExport/PropertyCollectionDao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using dao;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {

Expand Down
1 change: 1 addition & 0 deletions AccessIO/ImportExport/Transformers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Access = Microsoft.Office.Interop.Access;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {

Expand Down
1 change: 1 addition & 0 deletions AccessIO/Index.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using dao = Microsoft.Office.Interop.Access.Dao;

namespace AccessIO {
/// <summary>
Expand Down
1 change: 0 additions & 1 deletion AccessSVN Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
<!-- <ComponentRef Id="ProductComponent" /> -->
<!-- Note: The following ComponentGroupRef is required to pull in generated authoring from project references. -->
<ComponentGroupRef Id="Product.Generated" />
<ComponentRef Id="AccessIO.dll" />
<ComponentRef Id="AccessScrCtrl.exe" />
<ComponentRef Id="AccessScrCtrlUI.dll" />
Expand Down
10 changes: 9 additions & 1 deletion AccessScrCtrl/AccessScrCtrl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<RootNamespace>AccessScrCtrl</RootNamespace>
<AssemblyName>AccessScrCtrl</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
Expand Down Expand Up @@ -76,6 +77,12 @@
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Office.Interop.Access, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.Office.interop.access.dao, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -127,6 +134,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Names.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
4 changes: 2 additions & 2 deletions AccessScrCtrl/Properties/Names.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions AccessScrCtrl/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions AccessScrCtrl/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions AccessScrCtrl/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
13 changes: 8 additions & 5 deletions AccessSvn.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30204.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccessIO", "AccessIO\AccessIO.csproj", "{94666B4E-5818-4D82-B22A-6B5CB7C9CBA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccessScrCtrlUI", "AccessScrCtrlUI\AccessScrCtrlUI.csproj", "{4A38C0BC-BCDD-4070-9708-F69AAB5D2312}"
Expand All @@ -22,9 +24,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asvnTest", "asvnTest\asvnTest.csproj", "{4D2B2BE2-B111-447F-8969-4C035E32818B}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = AccessSvn.vsmdi
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Expand Down Expand Up @@ -102,5 +101,9 @@ Global
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35;packages\Unity.Interception.2.1.505.0\lib\NET35
SolutionGuid = {9926F5F4-ACB0-4838-99BD-581AF195E038}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = AccessSvn.vsmdi
EndGlobalSection
EndGlobal

0 comments on commit bc54270

Please sign in to comment.