DEP - i disabled it and now every code i have works. including printing reports.
Thanks for your help, djang. Still great advice youve given me as Im very new on accpac programming.
Probably this code will work if you try and test it, but I think may have the answer. My Sage accpac intelligence analysis 6.0a and connector 6.0a has expired. Im getting a warning saying that whenever i open accpac. This could be the issue, but i maybe wrong again.
The code i translated from vb6 is this one:
Dim session2 As AccpacCOMAPI.AccpacSession
session2 = CreateObject("ACCPAC.Session") 'tried this too: session2 = New AccpacCOMAPI.AccpacSession
session2.Init("", "XY", "XY0001", "60A")
session2.Open("ADMIN", "ADMIN", "SAMLTD"...
Im getting this after tweaking code and thoroughly checkin the session and date. Both seemed correct.
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=System.Windows.Forms...
I transferred the same code into VB6 and worked perfectly. now, i wonder what could be causing the problem (in Vb.net), when i'm only calling the finder and not modifying it. it has to be the same AccpacCOMAPI 1.0 and accpac finder 1.0 right?
i will take a look along those lines djang.
thanks for that advice about session's config. but unfortunately, i still get the same error. i've included a try/catch to determine if its session error but it isnt. it is a general type of exception ive been getting.
what could it be?
ive tried it as an integer array, but didnt work. my session config is pretty basic i think as im only doing a sample code, ive used it in another code and it works but maybe it's the problem:
Dim session As AccpacCOMAPI.AccpacSession
session = New AccpacCOMAPI.AccpacSession...
i still cant fix this problem. this what im getting whenever i run my code.
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147467259
Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
Source=WindowsApplication2
StackTrace:
at...
thanks for the reply. but i have tried error trapping with try-catch and it always causing a problem to a program "vshost32.exe". seems like it would crash it whenever i add try-catch to this code only, the rest of my code doesnt have any problem when i have exception handling.
ill try to check...
I used the code that i found here for access to the viewfinder. How can i fix this problem, is it due to my session config?
It is in VB.net and im using Accpac 6.0A. And I'm getting this error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
heres the code...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.