Using ADO for connecting MS Access in 64 Bit

    技术2026-09-17  11

    微软这是造什么孽, 居然没有64bit的Jet ODBC Driver

     

     

     

     

    http://www.eggheadcafe.com/community/aspnet/10/10133462/using-ado-for-connecting-ms-access-in-64-bit.aspx

     

     

     

     

     

     

    If you want to run a 32-bit application on 64-bit OS you need to do a small change in the your project file so that this will support the application in 64-bit OS.

    You can specify the software platform in project definition. To do this please open "my_project.csproj" in notepad or any other plain text editor and add the following code under "PropertyGroup" tag.

    <PlatformTarget>x86</PlatformTarget>

    Code will be some ting like that:

    Previouse code:

    <PropertyGroup Condition=" ‘$(Configuration)|$(Platform)’ == ‘Debug|AnyCPU’ "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin/Debug/</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" ‘$(Configuration)|$(Platform)’ == ‘Release|AnyCPU’ "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin/Release/</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup>

    Edited Cdoe

    <PropertyGroup Condition=" ‘$(Configuration)|$(Platform)’ == ‘Debug|AnyCPU’ "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin/Debug/</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" ‘$(Configuration)|$(Platform)’ == ‘Release|AnyCPU’ "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin/Release/</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <PlatformTarget>x86</PlatformTarget> </PropertyGroup>

    This worked for me. Hope this helps!

    Thanks,

    最新回复(0)