tags:

views:

259

answers:

2

hi,

I got an very basic test.asp page that needs to run on a 64-bit server

first i tried

<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"-->
<% 
.... more code

does not work (even though i found the reference in COM) the i try

<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.8 Library" UUID="{2A75196C-D9EB-4129-B803-931327F72D5C}" VERSION="2.8"-->
<% 
... more code

this works ,, but why can't i reference the 2.5 version when the library exist on the server?

A: 

MDAC is available only on 32-bit.

You must change your application to target x86 (by default it targets AnyCPU). It will still run on x64 but with smaller memory space.

Josip Medved
thx for helping out. Maybe im missing something .. but this is a classic ASP page, within a asp.net app. So basically i do have to do any compilation. Why then does the platform setting affect the outcome? Anyways why does the reference to 2.8 work then?
BBorg
In that case, my answer is not correct one.
Josip Medved
@Josip: If you believe the answer is incorrect you should delete it.
AnthonyWJones
@Josip: However it isn't actually that far of the mark
AnthonyWJones
+1  A: 

Josip is nearly correct MDAC 2.5 is only 32 bit (2.8 has a 64 bit flavour). By default on 64 bit server your application pool will run using 64 bit processes. It will be looking in the 64 bit version of the system hive for the 2.5 type library reference but won't find it (its only in the 32 bit version).

If you edit your application pool settings so that it runs as 32 bit you should find the 2.5 reference will work.

AnthonyWJones
thx for the answer, i believe you are right. One thing still remain unanswered. The msado25.tlp type library resides in both C:\Program Files\Common Files\System\ado and C:\Program Files (x86)\Common Files\System\ado why does the reference only work with 2.8? Thx for your time, very appreciated
BBorg
I would guess its there for completeness, they will be identical. The only difference is that 2.5 isn't registered in the 64 bit hive.
AnthonyWJones