Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / July 2004

Tip: Looking for answers? Try searching our database.

PRB : running .NET app with different versions of Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Konrad Rotuski - 05 Jul 2004 08:59 GMT
Hi

i have .NET app wrotten in VB.NET which uses Access COM object through
Interop ... on my machine i have Access Xp installed (version 10) and all
runs perfectly, however when i run this application on machine with Access
2000 (version 9)  installed there is some weird behaviour :

accessobj = New Access.Application
MsgBox(accessobj.ProductCode)   'runs OK
MsgBox(accessobj.Version)            ' Null Pointer Exception !

why .Version gives Null Pointer Exception when .ProductCode runs OK ???? ...
i'm copying generated by VS.NET interop dlls (i'm not using Office XP PIAs,
because i don't want my app to be version specific)
to the .exe directory on target machine ...

here is part of Interop.Access.dll MANIFEST :

.assembly Interop.Access
{
 .custom instance void
[mscorlib]System.Runtime.InteropServices.ImportedFromTypeLibAttribute::.ctor
(string) = ( 01 00 06 41 63 63 65 73 73 00 00 )                //
...Access..
 .custom instance void
[mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = ( 01
00 24 34 61 66 66 63 39 61 30 2D 35 66 39 39   // ..$4affc9a0-5f99

2D 31 30 31 62 2D 61 66 34 65 2D 30 30 61 61 30   // -101b-af4e-00aa0

30 33 66 30 66 30 37 00 00 )                      // 03f0f07..
 .hash algorithm 0x00008004
 .ver 9:0:0:0
}
.module Access.dll
// MVID: {0967E183-881C-4032-BAA3-E2CCA1196A2B}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 4096
.corflags 0x00000001
// Image base: 0x06ef0000

any help ... ?

regards, Konrad
Konrad Rotuski - 05 Jul 2004 10:50 GMT
> accessobj = New Access.Application
> MsgBox(accessobj.ProductCode)   'runs OK
> MsgBox(accessobj.Version)            ' Null Pointer Exception !

this one is solved .. ver 9 of Access COM interfaces does not have
Application.Version member

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.